Last active
December 19, 2018 07:48
-
-
Save golonzovsky/f6058e29a50da023918bf62d232a29e5 to your computer and use it in GitHub Desktop.
build and run angular-cli app in docker nginx via volume sharing
This file contains hidden or 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
version: '2' | |
services: | |
build-dist: | |
build: | |
context: . | |
dockerfile: Dockerfile.build | |
volumes: | |
- dist:/dist | |
serve: | |
image: nginx | |
ports: | |
- "127.0.0.1:80:80" | |
depends_on: | |
- build-dist | |
volumes: | |
- dist:/usr/share/nginx/html:ro | |
volumes: | |
dist: |
This file contains hidden or 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:7 | |
ENV REFRESHED_AT 2017-06-26 | |
RUN yarn global add @angular/cli | |
RUN ng set --global packageManager=yarn | |
COPY . /build | |
WORKDIR /build | |
RUN yarn | |
RUN ng build | |
VOLUME /build/dist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
consider rewrite to have an runnable tagged image as a result of a build