Skip to content

Instantly share code, notes, and snippets.

@Laxman-SM
Forked from bbachi/Dockerfile
Created February 4, 2020 09:36
Show Gist options
  • Save Laxman-SM/8d3424e77b824f25567c013bbc9e6852 to your computer and use it in GitHub Desktop.
Save Laxman-SM/8d3424e77b824f25567c013bbc9e6852 to your computer and use it in GitHub Desktop.
docker multi build example
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