Skip to content

Instantly share code, notes, and snippets.

@aamrits
Last active August 11, 2020 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aamrits/632986dc6bd24dafc9d9f07fa5cf9906 to your computer and use it in GitHub Desktop.
Save aamrits/632986dc6bd24dafc9d9f07fa5cf9906 to your computer and use it in GitHub Desktop.
Docker file for an angular 10 app
# node base image
FROM node:12.2.0-alpine as build
# working directory
WORKDIR /app
# copy everything to current working directory
COPY . ./
# run npm install
RUN npm install &&\
npm run build
# nginx base image
FROM nginx:1.16.0-alpine
# copy static contents of project to nginx html
COPY --from=build /app/dist/demoProject /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment