Created
February 24, 2020 15:37
-
-
Save ctrlaltdylan/16db454c4f50226b2d1936c0a3ba963b to your computer and use it in GitHub Desktop.
Angular Docker example
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: '3' | |
services: | |
app: | |
container_name: app | |
build: | |
context: ./app | |
dockerfile: dockerfile | |
volumes: | |
- './app' | |
- './app/node_modules' | |
ports: | |
- '4201:4200' |
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 | |
WORKDIR /app | |
ENV PATH /app/node_modules/.bin:$PATH | |
COPY package.json /app/package.json | |
RUN npm i | |
RUN npm i -g @angular/cli --unsafe | |
COPY . /app | |
CMD ng serve --host 0.0.0.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment