Skip to content

pitervergara/alpine_angular-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

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:
...

About

angular-cli (ng-cli) container over alpine image

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages