January 2018
Intermediate to advanced
348 pages
8h 17m
English
Here's a Docker file setup that can be placed at the root of the project:
FROM nginxEXPOSE 80COPY ./dist /usr/share/nginx/html
If we run the ng build command, it will generate the static content in the dist folder, and then we can issue the docker build command:
docker build -t hello-ng-dashboard
This generates a Docker image that we can then execute:
docker run --rm -p 80:80 --name hello-ng hello-ng-dashboard:latest
Finally, the URL to access the application would be http://localhost, which points to an NGINX web server that is running our application.
Read now
Unlock full access