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

Fix the build by locking versions during the container build #871

Merged
merged 1 commit into from
Nov 22, 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
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ node_modules/
coverage/
.*/
tmp/
*-lock*.*
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12.16.1-alpine3.11 as BUILD
FROM docker.io/library/node:12.16.1-alpine3.11 as BUILD
RUN apk add --no-cache \
gcc \
g++ \
Expand All @@ -12,6 +12,7 @@ RUN npm install -g npm@7
ARG BUILD_ENV=production
WORKDIR /app
COPY ./package.json ./
COPY ./package-lock.json ./
COPY ./tsconfig.json ./
COPY ./packages packages/

Expand All @@ -21,7 +22,7 @@ RUN npm install && npm run build
# this wil reduce the size of the image built in next steps significantly
RUN if [ "${BUILD_ENV}" = "production" ]; then npm prune --production; fi

FROM node:12.16.1-alpine3.11
FROM docker.io/library/node:12.16.1-alpine3.11

COPY --from=BUILD /app /app

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"publish": "npm publish --workspaces",
"check:versions": "node utils/check_package_version_consistency.js",
"build:docker": "docker build -t wot-servient .",
"build:podman": "podman build -t wot-servient .",
"clean:dist": "npm exec --workspaces -- npx rimraf tsconfig.tsbuildinfo dist",
"update:wot-typescript-definitions": "npx npm-check-updates -u -f \"wot-typescript-definitions\" --deep",
"link": "npm link -ws"
Expand Down