Getting started with Container Registry
Using these instructions, you will create your first registry and try managing Docker images.
Before you start
To create a registry, you will need to install the Nebius AI CLI and Docker
Creating a registry and performing basic operations on Docker images
-
Create a registry in Container Registry:
ncp container registry create --name my-first-registry
Result:
..done id: crpc9qeoft236r8tfalm folder_id: b1g0itj57rbjk9thrinv name: my-first-registry status: ACTIVE created_at: "2018-12-25T12:24:56.286Z"
You will use the
ID
received to access the created registry later. -
Authenticate in Container Registry using Docker Credential helper:
-
Configure Docker to use
docker-credential-yc
:ncp container registry configure-docker
Result:
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.
The
/home/<user>/.docker/config.json
configuration file must include the following line:"cr.ai.nebius.cloud": "ncp"
-
-
Pull a Docker image from Docker Hub
:docker pull ubuntu
-
Assign the pulled Docker image a tag in the following format:
cr.ai.nebius.cloud/<registry ID>/<Docker image name>:<tag>
:docker tag ubuntu \ cr.ai.nebius.cloud/crpc9qeoft236r8tfalm/ubuntu:hello
-
Push the Docker image to the Container Registry repository:
docker push \ cr.ai.nebius.cloud/crpc9qeoft236r8tfalm/ubuntu:hello
-
Run the Docker image:
docker run \ cr.ai.nebius.cloud/crpc9qeoft236r8tfalm/ubuntu:hello