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

chore: update Dockerfile to reduce the image size #3741

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ARG NODE_IMAGE_VERSION=16.13.0-alpine
FROM node:$NODE_IMAGE_VERSION as builder

COPY package*.json ./
RUN npm install --legacy-peer-deps
RUN npm install --legacy-peer-deps && npm cache clean --force;

COPY . .

Expand All @@ -18,7 +18,7 @@ COPY --from=builder package.json ./
COPY --from=builder package-lock.json ./
COPY --from=builder docs docs

RUN npm install --legacy-peer-deps --production
RUN npm install --legacy-peer-deps --production && npm cache clean --force;

# Removing this plugin because it gets loaded by prettier and forces a fixed order for imports
RUN rm -rf /package.json /package-lock.json /node_modules/prettier-plugin-organize-imports
Expand Down