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

Remove yarn from Docker release stage #176

Merged
merged 1 commit into from
Jul 13, 2023
Merged
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: 3 additions & 1 deletion app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ RUN npm run build -- --no-lint
FROM node:18-bullseye-slim AS release
WORKDIR /app

# Release stage doesn't have a need for `npm`, so remove it to avoid
# Release stage doesn't have a need for `npm`, so remove it to avoid
# any vulnerabilities specific to NPM
RUN npm uninstall -g npm
# Remove yarn as well (https://github.com/nodejs/docker-node/issues/777)
RUN rm -rf /opt/yarn-v*

# Don't run production as root
RUN addgroup --system --gid 1001 nodejs
Expand Down