Last active
August 11, 2020 14:43
-
-
Save aamrits/632986dc6bd24dafc9d9f07fa5cf9906 to your computer and use it in GitHub Desktop.
Docker file for an angular 10 app
This file contains 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
# 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