Added 2-staged dockerfile

ref #2
This commit is contained in:
Nicolai Ort 2021-04-06 10:54:13 +02:00
parent 85b40c10bf
commit c83ff39677
1 changed files with 8 additions and 1 deletions

View File

@ -2,4 +2,11 @@ FROM node:15.11.0-alpine3.13
WORKDIR /app
COPY . .
RUN yarn
RUN yarn build
RUN yarn build
# final image
FROM alpine
COPY --from=0 /app/dist /app
FROM fholzer/nginx-brotli:v1.19.1
COPY --from=1 /app /usr/share/nginx/html
COPY ./nginx.conf /etc/nginx/nginx.conf