Skip to content

Instantly share code, notes, and snippets.

@bbachi
Created July 28, 2019 13:15
Show Gist options
  • Select an option

  • Save bbachi/c7a6b5e4ff6693a79e672e0ab9430068 to your computer and use it in GitHub Desktop.

Select an option

Save bbachi/c7a6b5e4ff6693a79e672e0ab9430068 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