fix: add make dependency in dockerfile

This commit is contained in:
Nicolas Meienberger 2022-10-05 23:25:14 +02:00
parent 09ebeb02bd
commit d91dedc580
2 changed files with 8 additions and 5 deletions

View File

@ -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

View File

@ -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