Skip to content

Instantly share code, notes, and snippets.

@Huholoman
Last active September 13, 2018 11:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Huholoman/232348d7a1865ad8d5f7c6df3b74f121 to your computer and use it in GitHub Desktop.
Save Huholoman/232348d7a1865ad8d5f7c6df3b74f121 to your computer and use it in GitHub Desktop.
angular docker
### 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