Getting started with Container Registry
Before you start
To create a registry, you'll need a folder in Nebius Israel. If you don't have any folders yet, create a new folder:
Enter the folder name. The naming requirements are as follows:
- The length can be from 3 to 63 characters.
- It may contain lowercase Latin letters, numbers, and hyphens.
- The first character must be a letter. The last character can't 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.
Creating a registry and performing basic operations on Docker images
Create a registry in Container Registry:
yc container registry create --name my-first-registry
..done id: crpc9qeoft236r8tfalm folder_id: b1g0itj57rbjk9thrinv name: my-first-registry status: ACTIVE created_at: "2018-12-25T12:24:56.286Z"
You will use the
IDreceived to access the created registry later.
Authenticate in Container Registry using Docker Credential helper:
Configure Docker to use
yc container registry configure-docker
Credential helper is configured in '/home/<user>/.docker/config.json'
During setup, information about the current user profile is saved.
Make sure that Docker is configured.
/home/<user>/.docker/config.jsonconfiguration file must include the following line:
Pull a Docker image from Docker Hub:
docker pull ubuntu
Assign the pulled Docker image a tag in the following format:
cr.il.nebius.cloud/<registry ID>/<Docker image name>:<tag>:
docker tag ubuntu \ cr.il.nebius.cloud/crpc9qeoft236r8tfalm/ubuntu:hello
Push the Docker image to the repository Container Registry:
docker push \ cr.il.nebius.cloud/crpc9qeoft236r8tfalm/ubuntu:hello
Run the Docker image:
docker run \ cr.il.nebius.cloud/crpc9qeoft236r8tfalm/ubuntu:hello