Sign inSign up

pitervergara/alpine_angular-cli

By pitervergara

•Updated almost 10 years ago

Alpine image with angular-cli installed - node v6.2.0 - npm v3.10.9 - angular-cli v1.0.0-beta.18

Image
0

932

pitervergara/alpine_angular-cli repository overview

⁠Alpine angular-cli

Alpine image with angular-cli installed

Current build has the following versions:

  • node version: v6.2.0
  • npm version: 3.10.9
  • angular-cli version: 1.0.0-beta.18

User inside container is: uid=1000(user) gid=1000(user)

There is an entrypoint script (/entrypoint.sh) which runs npm install every time you initiate the container with the default command and then run ng serve --host 0.0.0.0.

⁠How to use it

⁠How to run my project
  • Simply run the container mounting your files inside the it (at /home/user/src):
me@host$ cd /my/project/folder
me@host$ docker run --rm -it -v "$PWD:/home/user/src" -p  4200:4200 -p 49153:49153 pitervergara/alpine_angular-cli
⁠How to start a new project

If you do not have an angular-cli project yet and the folder you mount into the container is empty, them the entrypoint script will create a project for you, so

  • run the following command to have a brand new project
me@host$ cd /empty/folder
me@host$ docker run --rm -it -v "$PWD:/home/user/src" -p  4200:4200 -p 49153:49153 pitervergara/alpine_angular-cli

If you want more control over project initialization, run a shell inside the container and once inside it, use ng command at your will:

me@host$ cd /empty/folder
me@host$ docker run --rm -it -v "$PWD:/home/user/src" pitervergara/alpine_angular-cli /bin/sh

user@container $ ng
Usage: ng <command (Default: help)>

Available commands in angular-cli:
...

Tag summary

Content type

Image

Digest

Size

167.8 MB

Last updated

almost 10 years ago

docker pull pitervergara/alpine_angular-cli