Better dockerfile, copy build folder properly

This commit is contained in:
E. Navennec 2021-03-31 14:30:57 +02:00
parent a350a305ad
commit 0fd836e62e

View file

@ -2,13 +2,18 @@ FROM node:15.12.0-alpine AS builder
WORKDIR /app
COPY scripts/ ./scripts
COPY package-lock.json .
COPY package.json .
RUN npm i
COPY . .
RUN npm i && npm run build
RUN npm run build
RUN ls build/
FROM nginx:alpine
COPY --from=builder /app/build/* /usr/share/nginx/html/
COPY --from=builder /app/build/ /usr/share/nginx/html/