Pulling a Docker image from a registry
Written by
Updated at August 29, 2024
To download a Docker image, you need the container-registry.images.puller
role or higher. In addition, you need to know which repository houses the Docker image, as well as its tag or hash.
To work with Docker images, install and configure Docker.
CLI
-
Select the Docker image you need. To do this, get a list of Docker images in the registry.
-
Pull the Docker image from the registry:
-
Using the tag:
docker pull cr.yandex/<registry_ID>/ubuntu:hello
Result:
hello: Pulling from crpd50616s9a********/ubuntu 84ed7d2f608f: Already exists be2bf1c4a48d: Already exists a5bdc6303093: Already exists e9055237d68d: Already exists Digest: sha256:035ac8e1bd9c49871a2fd76ccb3c4b0f84e7eee775919ccd345337ec******** Status: Downloaded newer image for cr.yandex/crpd50616s9a********/ubuntu:hello
-
Using the digest:
docker pull cr.yandex/<registry_ID>/ubuntu@sha256:035ac8e1bd9c49871a2fd76
Result:
ccb3c4b0f84e7eee775919ccd345337ec7b49f80d sha256:035ac8e1bd9c49871a2fd76ccb3c4b0f84e7eee775919ccd345337ec********: Pulling from crpd50616s9a********/ubuntu 84ed7d2f608f: Already exists ... e9055237d68d: Already exists Digest: sha256:035ac8e1bd9c49871a2fd76ccb3c4b0f84e7eee775919ccd345337ec******** Status: Downloaded newer image for cr.yandex/crpd50616s9a********/ubuntu@sha256:035ac8e1bd9c49871a2fd76ccb3c4b0f84e7eee775919ccd345337ec********
Note that in this case the Docker image will be pulled with no tag. The
TAG
field value will be<none>
.
-
-
Make sure the Docker image has been pulled:
docker image list
Result:
REPOSITORY TAG IMAGE ID CREATED SIZE cr.yandex/crpd50616s9a********/ubuntu <none> 50ff******** 24 hours ago 86.7MB ubuntu latest 1d9c******** 2 weeks ago 86.7MB