From a37a38c5367e480f6c27f0a8d7a415f5ed3ae99d Mon Sep 17 00:00:00 2001 From: bndw Date: Mon, 8 Jun 2020 20:33:12 -0700 Subject: :construction_worker: CI: Multi-stage build --- Dockerfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 15ee3a9..5a5f92f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,2 +1,11 @@ +FROM mhart/alpine-node:14 as builder + +WORKDIR /tmp +COPY . . + +RUN yarn && yarn build + +### +# production image FROM nginx:stable-alpine -COPY build /usr/share/nginx/html +COPY --from=builder /tmp/build /usr/share/nginx/html -- cgit v1.2.3