Dockerfile changes

This commit is contained in:
Paweł Malak 2021-11-13 12:03:35 +01:00
parent 08afaece2e
commit b4eb35c591
4 changed files with 16 additions and 5 deletions

View file

@ -1,16 +1,26 @@
FROM node:lts-alpine as build-front
RUN apk add --no-cache curl
WORKDIR /app
COPY ./client .
RUN npm install --production \
&& npm run build
FROM node:lts-alpine
WORKDIR /app
RUN mkdir -p ./public
COPY --from=build-front /app/build/ ./public
COPY package*.json ./
RUN npm install
COPY . .
CMD ["npm", "run", "skaffold"]

View file

@ -1,10 +1,11 @@
FROM node:14 as builder
FROM node:14-alpine3.11 as builder
WORKDIR /app
COPY package*.json ./
RUN npm install --production
RUN apk --no-cache --virtual build-dependencies add python make g++ \
&& npm install --production
COPY . .
@ -16,7 +17,7 @@ RUN mkdir -p ./public ./data \
&& mv ./client/build/* ./public \
&& rm -rf ./client
FROM node:14-alpine
FROM node:14-alpine3.11
COPY --from=builder /app /app