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:
parent
54552df795
commit
0a0d050998
1 changed files with 4 additions and 1 deletions
|
|
@ -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 . .
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue