The command line for creating images
In this section, we will take a closer look at Docker and other tools that you will commonly use to create container images for your projects.
We will start by reviewing the docker
command line, which is the most popular tool for developers and users due to its simplicity and friendly environment.
Docker uses a common schema for all its arguments and options. We will use docker <OBJECT> <ACTION> <OPTIONS>
. As a Docker container runtime identifies its objects by their IDs, it is common to omit the <OBJECT>
primitive, but you should make sure that you use the right object. It is improbable that you will commit an error, but it is good practice to remember to include the object as part of the command.
Let’s start with the basics – that is, learning which command will create an image.
Actions for creating images
We use the build
action to create images using a Dockerfile. By default, it will search...