Created
February 14, 2020 15:48
-
-
Save devbyray/798a61085e705ad3011356b2c71472c3 to your computer and use it in GitHub Desktop.
Example Dockerimage for Angular 9.0
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
FROM node:13.3.0 AS compile-image | |
RUN npm install -g yarn | |
WORKDIR /opt/ng | |
COPY .npmrc package.json yarn.lock ./ | |
RUN yarn install | |
ENV PATH="./node_modules/.bin:$PATH" | |
COPY . ./ | |
RUN ng build --prod | |
FROM nginx | |
COPY docker/nginx/default.conf /etc/nginx/conf.d/default.conf | |
COPY --from=compile-image /opt/ng/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