From fa526752fba24b1f60599087d79128553e083f6e Mon Sep 17 00:00:00 2001 From: NGPixel Date: Sat, 14 Dec 2019 23:12:54 -0500 Subject: [PATCH] fix: arm dockerfile build step --- dev/build-arm/Dockerfile | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/dev/build-arm/Dockerfile b/dev/build-arm/Dockerfile index da54759b..6ba0588d 100644 --- a/dev/build-arm/Dockerfile +++ b/dev/build-arm/Dockerfile @@ -1,3 +1,19 @@ +# ========================= +# --- BUILD NPM MODULES --- +# ========================= +FROM node:12.13-alpine AS build + +RUN apk add yarn g++ make python --no-cache + +WORKDIR /wiki + +COPY ./package.json ./package.json + +RUN yarn --production --frozen-lockfile --non-interactive --network-timeout 100000 + +# =============== +# --- Release --- +# =============== FROM node:12.13-alpine LABEL maintainer="requarks.io" @@ -9,6 +25,7 @@ RUN apk add bash curl git openssh gnupg sqlite --no-cache && \ WORKDIR /wiki COPY --chown=node:node ./build/assets ./assets +COPY --chown=node:node --from=build /wiki/node_modules ./node_modules COPY --chown=node:node ./server ./server COPY --chown=node:node ./build/server/views ./server/views COPY --chown=node:node ./dev/build/config.yml ./config.yml @@ -16,8 +33,6 @@ COPY --chown=node:node ./dev/docker-common/wait.sh ./wait.sh COPY --chown=node:node ./package.json ./package.json COPY --chown=node:node ./LICENSE ./LICENSE -RUN yarn --production --frozen-lockfile --non-interactive --network-timeout 100000 - USER node EXPOSE 3000