Skip to content

Commit

Permalink
Fix alpine image vulnerabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelpuchta committed Nov 29, 2024
1 parent 4a1698a commit e515bcc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ RUN npm run build
# Final image that runs the app
FROM node:20.17.0-alpine3.20

# TODO: Check https://hub.docker.com/r/library/node/tags?name=alpine3.20
# - Remove ssl if CVE-2024-9143 is fixed (https://scout.docker.com/vulnerabilities/id/CVE-2024-9143?s=alpine)
# - Remove npm upgrade if CVE-2024-21538 is fixed (https://scout.docker.com/vulnerabilities/id/CVE-2024-21538?s=github)
RUN apk add --no-cache libssl3=3.3.2-r1 && \
npm update -g npm && npm cache clean --force && \
apk add --no-cache dumb-init && rm -rf /var/cache/apk/*

USER node
ENV NODE_ENV=production
ENV npm_config_cache=/tmp/.npm
Expand Down

0 comments on commit e515bcc

Please sign in to comment.