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
9bfadd7344
commit
3e05d8eec9
1 changed files with 4 additions and 1 deletions
|
|
@ -7,7 +7,10 @@ WORKDIR /app
|
||||||
RUN apk add --no-cache ffmpeg curl
|
RUN apk add --no-cache ffmpeg curl
|
||||||
|
|
||||||
COPY package.json ./
|
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 . .
|
COPY . .
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue