How it works...
A Dockerfile is a small configuration file, designed to describe how to build a Docker image. The file has several steps to create a new image. The first line indicates that the new image is created from the centos:latest image. If you see the output, the container ID is different for each step; these are intermediate containers. The output shows detailed information about what is being done.
You build the Docker image with the docker build command. You specify the tag for the Docker image. You also tell the command that you have the Dockerfile in the current directory, which you would like docker build to use. The docker build command looks in the current directory for the Dockerfile, and builds the image based on the information ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access