Created
July 29, 2019 03:10
-
-
Save bbachi/1c4b728546d2c1e7eb2206e03a234484 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