Creating a Docker image with Angular2 and Angular-cli
I want to have different docker images to different componentes of the MEAN Stack. So, we began building the Docker image with a Mongo DB database and in this post we will address the goal of having a Docker image with the Angular environment.
I will take the following links how reference
And
Let´s Start
I will do different Threads:
Thread #01: docker pull from docker hub
https://hub.docker.com/r/teracy/angular-cli/
docker pull teracy/angular-cli

ok, we have the docker image: what is next?

$ mkdir new-ng-project
$ cd new-ng-project
$ docker run -it -rm -v “$PWD”:/usr/src -w /usr/src teracy/angular-cli /bin/bash
next:
ng init — name angular-pablo-ezequiel — style scss
And I have the following error

I don´t know how to fix it…
Let´s see that we have an angular project created: let´s compile and run it

But I don´t know what to do next

I have been whit this mistake before: the reason was that $ng serve command by default was accepting only request from localhost, and to allow connections from any host with
$ng serve — host 0.0.0.0.0 — port 4200
Thread #02: docker from github
The steps are
$ git clone https://github.com/teracyhq/angular-boilerplate.git — depth=1 new-ng-project
$ docker-compose up serve
$ docker-compose up test
We can note the use of docker compose to combine multiples docker instances based on the docker-compose file. A good post about docker compose.

I have the following error with docker-comopose (I don´t have the files) …
Thread #03: Angular App (AWS EC2 instances)
I will follow the tutorial
Angular-cli is the easiest way to start with angular, let´see:
$ ng version
$ sudo ng new todo-app




I have been whit this mistake before: the reason was that $ng serve command by default was accepting only request from localhost, and to allow connections from any host with
$ ng serve --host 0.0.0.0.0 --port 4200

Ok! that´s better.
I would en the post at this point…
In a different post “Angular app with angular-cli” you can see every step until the “todo app” is running
Next Steps
Following the same idea to have an angular-cli on a docker instance on AWS I could follow the following post that It looks promising
https://veamospues.wordpress.com/2016/12/13/angular-cli-docker-image/#comment-760