Getting started with Cloud Registry
Use this guide to create your first registry and try managing Docker images.
Getting started
To create a registry, you will need a folder in Yandex Cloud. If you do not have any folders yet, create one before creating a registry:
-
In the management console
, select the appropriate cloud from the list on the left. -
At the top right, click Create folder.
-
Enter the folder name. The naming requirements are as follows:
- The name must be from 3 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- The first character must be a letter and the last character cannot be a hyphen.
-
(Optional) Enter a description of the folder.
-
Select Create a default network. This will create a network with subnets in each availability zone. Within this network, a default security group will be created, inside which all network traffic is allowed.
-
Click Create.
Creating a registry and pushing a Docker image
To work with Cloud Registry and Docker images:
-
Install the Yandex Cloud CLI and configure Docker.
-
Create a registry in Cloud Registry.
-
Get authenticated in Cloud Registry.
-
Pull a Docker image from Docker Hub
:docker pull ubuntu
-
Assign the pulled Docker image a tag in this format:
registry.yandexcloud.net/<registry_ID>/<Docker_image_name>:<tag>
:docker tag ubuntu \ registry.yandexcloud.net/<registry_ID>/ubuntu:hello
-
Push the Docker image to the repository Cloud Registry:
docker push \ registry.yandexcloud.net/<registry_ID>/ubuntu:hello
-
Run the Docker image:
docker run \ registry.yandexcloud.net/<registry_ID>/ubuntu:hello