Pushing a Docker image to a registry in Cloud Registry
Written by
Updated at December 16, 2024
These instructions describe how to push a local Docker image to a registry.
Note
To push an image, you need to configure Docker and get authenticated in the registry.
To push a Docker image to the registry, you need the cloud-registry.artifacts.pusher
role or higher.
CLI
-
View the list of available Docker images:
docker image list
Result:
REPOSITORY TAG IMAGE ID CREATED SIZE registry.yandexcloud.net/crpd50616s9a********/ubuntu hello 50ff******** 23 hours ago 86.7MB ubuntu latest 1d9c******** 2 weeks ago 86.7MB
-
(Optional) Assign a URL to the Docker image using the following format:
registry.yandexcloud.net/<registry_ID>/<Docker_image_name>:<tag>
:docker tag ubuntu \ registry.yandexcloud.net/<registry_ID>/ubuntu:hello
Note
You can only push Docker images to Cloud Registry if they have a URL in this format:
registry.yandexcloud.net/<registry_ID>/<Docker_image_name>:<tag>
. -
Push the required Docker image to the registry:
docker push registry.yandexcloud.net/<registry_ID>/ubuntu:hello