Skip to content

Commit

Permalink
refactor: change prod image to alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackDark committed Oct 11, 2024
1 parent baf0116 commit a60c0b8
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md
# TODO because multiarch build has problems with QEMU and Node we cannot use alpine here: https://github.com/nodejs/docker-node/issues/1798
FROM node:22.9.0-slim AS base
WORKDIR /app

Expand Down Expand Up @@ -35,16 +36,10 @@ ENV SECRETS_LOCATION=/app/config/secrets.yml
CMD [ "pnpm", "start" ]

# https://github.com/evanw/esbuild/issues/1921
# TODO not using alpine for now because different error messages for example for requests.
FROM node:22.9.0-slim AS prod
FROM node:22.9.0-alpine AS prod
WORKDIR /app

#RUN apk add --no-cache libstdc++ dumb-init git

RUN apt-get update && apt-get install -y \
git \
dumb-init \
&& rm -rf /var/lib/apt/lists/*
RUN apk add --no-cache libstdc++ dumb-init git

# TODO maybe in future. Results in breaking change
#USER node
Expand Down

0 comments on commit a60c0b8

Please sign in to comment.