diff options
| author | bndw <benjamindwoodward@gmail.com> | 2020-06-08 20:33:12 -0700 |
|---|---|---|
| committer | bndw <benjamindwoodward@gmail.com> | 2020-06-08 20:33:12 -0700 |
| commit | a37a38c5367e480f6c27f0a8d7a415f5ed3ae99d (patch) | |
| tree | b7aedbda7f2235f6a079f5321fa7e21dfec0b8a5 /Dockerfile | |
| parent | 25a045e4e0b7f6ab166d2c1936361fe77892295f (diff) | |
:construction_worker: CI: Multi-stage build
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 11 |
1 files changed, 10 insertions, 1 deletions
| @@ -1,2 +1,11 @@ | |||
| 1 | FROM mhart/alpine-node:14 as builder | ||
| 2 | |||
| 3 | WORKDIR /tmp | ||
| 4 | COPY . . | ||
| 5 | |||
| 6 | RUN yarn && yarn build | ||
| 7 | |||
| 8 | ### | ||
| 9 | # production image | ||
| 1 | FROM nginx:stable-alpine | 10 | FROM nginx:stable-alpine |
| 2 | COPY build /usr/share/nginx/html | 11 | COPY --from=builder /tmp/build /usr/share/nginx/html |
