Skip to content

Commit 84851e6

Browse files
committed
chore: Replaces npm ci calls with npm clean-install in Dockerfile
1 parent d04182f commit 84851e6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ FROM base as builder
2424

2525
ARG BUILD_SCRIPT=build
2626

27-
RUN npm ci
27+
RUN npm clean-install
2828
COPY --chown=node:node tsconfig.json ./tsconfig.json
2929
COPY --chown=node:node src/ ./src/
3030
RUN npm run $BUILD_SCRIPT
@@ -36,7 +36,7 @@ RUN npm run $BUILD_SCRIPT
3636
FROM base as dev
3737

3838
# TODO: Check if volume mounts could be beneficial for development
39-
RUN npm ci
39+
RUN npm clean-install
4040

4141
COPY --chown=node:node --from=builder /app/dist/ ./dist/
4242
COPY --chown=node:node resources/ ./resources/
@@ -54,7 +54,7 @@ HEALTHCHECK --interval=1m --timeout=30s --retries=3 \
5454
CMD wget --spider $(hostname):8080
5555

5656
ENV NODE_ENV=production
57-
RUN npm ci && \
57+
RUN npm clean-install && \
5858
npm cache clean --force && \
5959
rm -Rf /home/node/.npm/
6060

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545
"test": "jest --coverage",
4646
"dev": "nodemon --ext ts,html,json,txt --watch ./src/ --watch ./resources/lang/ --watch ./resources/web/dynamic/ --watch ./resources/email/ --exec \"ts-node src/index.ts\"",
4747

48-
"docker:build": "docker build --rm .",
48+
"docker:build": "docker build --pull --rm .",
4949
"docker:build:prod": "npm run docker:build -- --target prod --tag mc-auth-web:latest",
50-
"docker:build:dev": "npm run docker:build -- --pull --target dev --tag mc-auth-web:dev --build-arg BUILD_SCRIPT=\"build:dev\"",
50+
"docker:build:dev": "npm run docker:build -- --target dev --tag mc-auth-web:dev --build-arg BUILD_SCRIPT=\"build:dev\"",
5151
"docker:dev": "npm run docker:build:dev && (docker stop mc-auth-web-dev;docker rm mc-auth-web-dev;echo '') && docker run --network host --name mc-auth-web-dev --cpus 2 --memory 256M --volume $(realpath ./storage/):/app/storage/ mc-auth-web:dev"
5252
},
5353
"engines": {

0 commit comments

Comments
 (0)