Pulling an image
After searching for the image, we can pull it to the system by running the Docker daemon. Let's see how we can do that.
Getting ready
Ensure that the Docker daemon is running on the host and can be connected through the Docker client.
How to do it...
To pull an image from the Docker registry, you can either run the following:
docker image pull [OPTIONS] NAME[:TAG|@DIGEST]
Or the legacy command:
docker pull [OPTIONS] NAME[:TAG|@DIGEST]
The following is an example of pulling the ubuntu
image:
$ docker image pull ubuntu

How it works...
The pull
command downloads all layers from the Docker registry that are required to create that image locally. We will see details about layers in the next chapter.
There's more...
Image tags group images of the same type. For example, CentOS can have images with tags such as centos6
, centos7
, and so on. To pull an image with a specific tag, for instance, run the following command:
$ docker image pull centos:centos7
By default, the image with latest...