Hi,
We are going to Dockerize our Angular 7 application, the angular version is not very important after version 2. So we may use the same process for Angular 2+
- Create your angular app. (ng new APP_NAME)
- Create your Dockerfile
- Run your Docker :)
TL;DR
Here you may find the codes :https://github.com/NurettinYAKIT/nurettinyakit.com/tree/master/fe-stock-angular
For my example I'm creating the application called "fe-stock-angular" the command is :
ng new fe-stock-angular
In the same directory, we will create a Dockerfile this file won't be inside the application folder but the upper folder like :
Now create the Dockerfile as follow
Now build your image
docker run -i -t -p 8080:80 fe-stock-angular
Now you can open your browser to check your application :
localhost:8080
docker build -t fe-stock-angular .And the last step, run your docker image
docker run -i -t -p 8080:80 fe-stock-angular
Now you can open your browser to check your application :
localhost:8080
1 comment:
Nice article you have posted here.Thank you for sharing this information. Share more like this.
DevOps Training in T Nagar
Graphic design courses in Porur
Web Designing Course in T Nagar
Salesforce Training in Tambaram
SEO Training in OMR
AWS Training in Velachery
Tally Course in Chennai
Bigdata Training in Anna Nagar
RPA Training in OMR
Angularjs Training in Tambaram
Post a Comment