Sign inSign up

tolanhd/angular-env

By tolanhd

Updated over 8 years ago

An docker images with node.js, angular-cli(6.x) and nginx(1.12.2) based on Alpine 3.7

Image
0

10K+

tolanhd/angular-env repository overview

Supported Tags

Tags based on installed node version

Quick reference

How to use

$ docker run --rm -v x:/project/dist/:/var/www/localhost/htdocs:ro -d tolanhd/angular-env

A cleaner solution than bind a mount is to create a Dockerfile in your angular project
root folder to create a new image that includes the content, like the example below.

** Dockerfile Example **

FROM tolanhd/angular-env
COPY /dist/* /var/www/localhost/htdocs/
CMD ["nginx"]

Run docker build -t mytag . in the directory where the Dockerfile is located to create a
new image with the name mytag in this example.

When your build is complete, start a new container.
$ docker run --rm -d mytag

** Exposing port **

Expose the port 80 from container to port 8080 on the host
$ docker run --rm -d -p 8080:80 mytag
Now you can navigate to http://localhost:8080 or http://host-ip:8080 in your favorite browser.

Tag summary

Content type

Image

Digest

Size

42.4 MB

Last updated

over 8 years ago

docker pull tolanhd/angular-env