-
-
Save Laxman-SM/ecf6560f5970be186445bdd888257605 to your computer and use it in GitHub Desktop.
docker multi build example
This file contains hidden or 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
| FROM node:10 AS ui-build | |
| WORKDIR /usr/src/app | |
| COPY WebApp/ ./WebApp/ | |
| RUN cd WebApp && npm install @angular/cli && npm install && npm run build | |
| FROM node:10 AS server-build | |
| WORKDIR /root/ | |
| COPY --from=ui-build /usr/src/app/WebApp/dist ./WebApp/dist | |
| COPY package*.json ./ | |
| RUN npm install | |
| COPY index.js . | |
| EXPOSE 3070 | |
| ENTRYPOINT ["node"] | |
| CMD ["index.js"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment