Last active
September 13, 2018 11:18
-
-
Save Huholoman/232348d7a1865ad8d5f7c6df3b74f121 to your computer and use it in GitHub Desktop.
angular docker
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
### Dockerfile . | |
FROM node:latest | |
ENV APP_ROOT /app | |
RUN mkdir $APP_ROOT | |
WORKDIR $APP_ROOT | |
RUN npm i -g @angular/cli \ | |
&& npm i -g typescript | |
EXPOSE 4200 | |
CMD ["bash", "init.sh"] | |
### init.sh | |
#!/bin/bash | |
npm install | |
npm start | |
### docker-compose.yml | |
version: '3' | |
services: | |
web: | |
container_name: ng-web | |
build: . | |
ports: | |
- "4200:4200" | |
- "49153:49153" | |
volumes: | |
- .:/app | |
### package.json | |
"start": "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