1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-07 14:35:26 +02:00

fix node-gyp error on apple silicon

This commit is contained in:
Nikita Melnikov 2022-04-06 22:44:43 +04:00
parent 2e065adce6
commit b9fec766a8

View file

@ -1,10 +1,17 @@
# Stage 1 - build
FROM node:16.14.0-alpine3.15 as build
## Install build toolchain, install node deps and compile native add-ons
RUN apk add --no-cache python3 make g++
WORKDIR /usr/src/app
COPY package.json yarn.lock ./
RUN yarn install --production
RUN cp -R node_modules prod_node_modules
RUN yarn install
COPY . .
@ -19,9 +26,7 @@ FROM node:16.14.0-alpine3.15
WORKDIR /usr/src/app
COPY package.json yarn.lock ./
RUN yarn install --production
COPY --from=build ./prod_node_modules ./node_modules
COPY --from=build /usr/src/app/dist ./dist
COPY --from=build /usr/src/app/public ./public