From c83ff39677c4575346a0b7eced95796de90d6fee Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Tue, 6 Apr 2021 10:54:13 +0200 Subject: [PATCH] Added 2-staged dockerfile ref #2 --- Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4f581af..cc4f260 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,4 +2,11 @@ FROM node:15.11.0-alpine3.13 WORKDIR /app COPY . . RUN yarn -RUN yarn build \ No newline at end of file +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 \ No newline at end of file