In this tutorial, we will learn to create an image of an application. This application is a simple web application built in node.js. Follow the below steps to create an image of this application:
- Copy the application's repository.
git clone https://github.com/ashish993/helloworld.git
- Build the container file. The below command will create container image & we will tag it as helloworldapp
docker build .\helloworld -t helloworldapp
- Check docker images. Run the below command and it will list all the docker images.
docker images
- Run the container locally.
docker run -d -p 8080:80 helloworldapp
- Navigate to http://localhost:8080 in your browser. The web page will be opened as shown below.
Comments
Post a Comment
Thanks for your comment. In case of any concerns, please contact me at er.ashishsharma@outlook.com