Browse Source
The building will happen on the regular `node:8` image, but the final image will run `node:8-alpine` which will reduce the image size from 960 MB to 120 MB https://docs.docker.com/develop/develop-images/multistage-build/fix-133-memory-crash
Henri Kuittinen
5 years ago
committed by
GitHub
1 changed files with 5 additions and 1 deletions
@ -1,6 +1,10 @@ |
|||
FROM node:8 |
|||
FROM node:8 as builder |
|||
WORKDIR /workspace |
|||
COPY . . |
|||
RUN npm install |
|||
|
|||
FROM node:8-alpine |
|||
WORKDIR /workspace |
|||
COPY --from=builder /workspace . |
|||
CMD npm start |
|||
EXPOSE 3002 |
|||
|
Loading…
Reference in new issue