Skip to content

Instantly share code, notes, and snippets.

@Laxman-SM
Forked from bbachi/Dockerfile
Created February 4, 2020 09:36
Show Gist options
  • Select an option

  • Save Laxman-SM/ecf6560f5970be186445bdd888257605 to your computer and use it in GitHub Desktop.

Select an option

Save Laxman-SM/ecf6560f5970be186445bdd888257605 to your computer and use it in GitHub Desktop.
docker multi build example
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