Skip to content

Commit

Permalink
Add multi-stage Dockerfile
Browse files Browse the repository at this point in the history
Builds using a Node container, then copies the files from the builder to
an NGINX image that serves on port 80
  • Loading branch information
atamis committed Jun 16, 2020
1 parent 579969c commit 7db0d69
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:14 as builder

COPY . /work

WORKDIR /work

RUN npm install && npm run clean-build


FROM nginx

COPY --from=builder /work/webapp-build /usr/share/nginx/html

0 comments on commit 7db0d69

Please sign in to comment.