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

@ -3,3 +3,10 @@ WORKDIR /app
COPY . .
RUN yarn
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