Table of contents
▶ What is Dockerfile?
Docker can build images automatically by reading the instructions from a Dockerfile
. A Dockerfile
is a text document that contains all the commands a user could call on the command line to assemble an image. This link describes the commands you can use in a Dockerfile
.
▶Task:
Create a Dockerfile for a simple web application (e.g. a Node.js or Python app)
Build the image using the Dockerfile and run the container
Verify that the application is working as expected by accessing it in a web browser
Push the image to a public or private repository (e.g. Docker Hub )
All files related to this Task are on my GitHub portfolio.
This article was an overview of creating a Dockerfile, building an image and pushing it to a public Docker Hub repo. I hope it will be helpful to all of you.