Skip to content

Instantly share code, notes, and snippets.

@golonzovsky
Last active December 19, 2018 07:48
Show Gist options
  • Save golonzovsky/f6058e29a50da023918bf62d232a29e5 to your computer and use it in GitHub Desktop.
Save golonzovsky/f6058e29a50da023918bf62d232a29e5 to your computer and use it in GitHub Desktop.
build and run angular-cli app in docker nginx via volume sharing
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:
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
@golonzovsky
Copy link
Author

golonzovsky commented May 27, 2017

consider rewrite to have an runnable tagged image as a result of a build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment