From d91dedc580361a392762a052d08558a31221fa67 Mon Sep 17 00:00:00 2001 From: Nicolas Meienberger Date: Wed, 5 Oct 2022 23:25:14 +0200 Subject: [PATCH] fix: add make dependency in dockerfile --- Dockerfile | 11 +++++++---- Dockerfile.dev | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 70dcdd59..44cd098e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18-alpine3.16 AS build +FROM node:18 AS build RUN npm install node-gyp -g @@ -23,17 +23,20 @@ FROM node:18-alpine3.16 as app WORKDIR / -RUN apk --no-cache add g++ # Install dependencies +RUN apk --no-cache add python3 +RUN apk --no-cache add make +RUN apk --no-cache add build-base + RUN npm install node-gyp -g WORKDIR /api COPY ./packages/system-api/package*.json /api/ -RUN npm install --production +RUN npm install --omit=dev WORKDIR /dashboard COPY ./packages/dashboard/package*.json /dashboard/ -RUN npm install --production +RUN npm install --omit=dev COPY --from=build /api/dist /api/dist COPY --from=build /dashboard/.next /dashboard/.next diff --git a/Dockerfile.dev b/Dockerfile.dev index e101d6c6..80945c13 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -2,7 +2,7 @@ FROM node:18-alpine3.16 WORKDIR / -RUN apk --no-cache add g++ +RUN apk --no-cache add g++ make RUN npm install node-gyp -g WORKDIR /api