Dockerfile: add build tools for argon2 native compile

argon2 requires node-gyp + python3 + g++ + make to build its C
extension. Added as a virtual .build-deps package so it's compiled
during npm install, then purged to keep the Alpine image slim.
This commit is contained in:
Daniel 2026-04-14 03:09:38 +02:00
parent 54552df795
commit 0a0d050998

View file

@ -7,7 +7,10 @@ WORKDIR /app
RUN apk add --no-cache ffmpeg curl
COPY package.json ./
RUN npm install --omit=dev
# argon2 compiles native code via node-gyp — needs python3/make/g++ at build time
RUN apk add --no-cache --virtual .build-deps python3 make g++ \
&& npm install --omit=dev \
&& apk del .build-deps
COPY . .