Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin version of containers in Dockerfiles #167

Merged
merged 2 commits into from
Jun 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

# Global args, set before the first FROM, shared by all stages
ARG NODE_ENV="production"
ARG NODE_DIGEST="sha256:1a9a71ea86aad332aa7740316d4111ee1bd4e890df47d3b5eff3e5bded3b3d10"

################################################################################
# Build stage 1 - `yarn build`

FROM node:16-alpine as builder
FROM node@${NODE_DIGEST} as builder
# Import our shared args
ARG NODE_ENV

Expand All @@ -24,7 +25,7 @@ RUN yarn run build
################################################################################
# Build stage 2 - COPY the relevant things (multiple steps)

FROM node:16-alpine as clean
FROM node@${NODE_DIGEST} as clean
# Import our shared args
ARG NODE_ENV

Expand All @@ -36,7 +37,7 @@ COPY --from=builder /app/migrations/ /app/migrations/
################################################################################
# Build stage FINAL - COPY everything, once, and then do a clean `yarn install`

FROM node:16-alpine
FROM node@${NODE_DIGEST}
# Import our shared args
ARG NODE_ENV

Expand Down
2 changes: 1 addition & 1 deletion db/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM postgres:14
FROM postgres@sha256:596e4c843a9db32269a3757624d8a6a6f633e01895acb83fe0842497fd897eb7

COPY create-multiple-postgresql-databases.sh /docker-entrypoint-initdb.d/create-multiple-postgresql-databases.sh
2 changes: 1 addition & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
ports:
- '5432:5432'
hedgedoc:
image: quay.io/hedgedoc/hedgedoc:1.9.3-alpine
image: quay.io/hedgedoc/hedgedoc@sha256:766663fea4e3f55cd5c1cfd12c71d5ccb258809b2b74eedd035efe0883bf0970
environment:
CMD_DB_URL: 'postgres://ctfnote:ctfnote@db:5432/hedgedoc'
CMD_URL_PATH: 'pad'
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ services:
ports:
- 8080:80
hedgedoc:
image: quay.io/hedgedoc/hedgedoc:1.9.3-alpine
image: quay.io/hedgedoc/hedgedoc@sha256:766663fea4e3f55cd5c1cfd12c71d5ccb258809b2b74eedd035efe0883bf0970
environment:
- CMD_DB_URL=postgres://ctfnote:ctfnote@db:5432/hedgedoc
- CMD_URL_PATH=pad
Expand Down
4 changes: 2 additions & 2 deletions front/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine AS build-deps
FROM node@sha256:1a9a71ea86aad332aa7740316d4111ee1bd4e890df47d3b5eff3e5bded3b3d10 AS build-deps

RUN mkdir -p /usr/src/app
COPY package.json quasar.conf.js .eslintrc.js .eslintignore tsconfig.json .postcssrc.js yarn.lock babel.config.js quasar.extensions.json /usr/src/app/
Expand All @@ -12,7 +12,7 @@ WORKDIR /usr/src/app
RUN yarn build

# _--------_
FROM nginx:1.22.0-alpine
FROM nginx@sha256:f335d7436887b39393409261603fb248e0c385ec18997d866dd44f7e9b621096

RUN mkdir -p /logs

Expand Down