Last active
August 31, 2023 12:26
-
-
Save KartikeyMish/a7965d3b906e0b2e272318f43a2b734f to your computer and use it in GitHub Desktop.
Dockerfile template for angular projects
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
# angular version = 16 | |
# Get your appname from the package-lock.json file of you angular project | |
# Stage 1 | |
FROM node:latest as node | |
WORKDIR /app | |
COPY . . | |
RUN npm install | |
RUN npm run build --prod | |
# Stage 2 | |
FROM nginx:alpine | |
COPY --from=node /app/dist/{app-name} /usr/share/nginx/html | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In case you want to run docker via terminal instead of VS code extension, here's the terminal code