-
-
Save Laxman-SM/8d3424e77b824f25567c013bbc9e6852 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 | |
# set the work directory | |
WORKDIR /usr/src/app | |
# copy package.json | |
COPY package*.json ./ | |
# copy webapp folder | |
COPY WebApp/package*.json ./WebApp/ | |
# RUN npm install for node js dependencies | |
RUN npm install \ | |
&& cd WebApp \ | |
&& npm install @angular/cli \ | |
&& npm install | |
# Bundle app source | |
COPY . . | |
# builing Angular UI | |
RUN cd WebApp && npm run build | |
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