Member-only story
Dockerize your Angular Application
Create a Docker image of your Angular application using Nginx
3 min readAug 11, 2020
Angular is a popular and powerful front-end framework for building enterprise-grade applications.
In this article, I will show you how you can easily create a docker image of your Angular application. Some of the reasons you might want to do this are:
- To deploy your Angular application as a service
- To easily share your application with other developers and
- To easily run the application in other environments without being concerned about installing application dependencies
Create an Angular application
You can create an Angular application using the Angular CLI, simply run the following command:
$ ng new angular-docker --style==scss --routing=true
Add a Dockerfile
Add a file named Dockerfile to the root of your newly created angular project. Note: the file has no extension.
$ touch Dockerfile
A Dockerfile contains instructions for building the docker image and also defines an entry point for executing the container, i.e. a running instance of the image.