Last active
May 3, 2021 15:26
-
-
Save ujwaldhakal/3b8cc027d02343e9a7a41ac59d824284 to your computer and use it in GitHub Desktop.
Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build Stage 1 | |
# This build created a staging docker image | |
# | |
FROM node:10.15.2-alpine AS appbuild | |
WORKDIR /usr/src/app | |
COPY package.json ./ | |
RUN npm install | |
COPY ./src ./src | |
# Build Stage 2 | |
# This build takes the production build from staging build | |
# | |
FROM node:10.15.2-alpine as production | |
WORKDIR /usr/src/app | |
COPY package.json ./ | |
RUN npm install | |
COPY --from=appbuild /usr/src/app/ ./ | |
EXPOSE 4002 | |
CMD npm run production |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment