Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Solutions
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Container Registry
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Authentication in Yandex Container Registry
    • Managing a Docker image
      • Getting information about available Docker images
      • Creating a Docker image
      • Pushing a Docker image to a registry
      • Pulling a Docker image from a registry
      • Deleting a Docker image from a registry
    • Managing a registry
      • Getting information about existing registries
      • Creating a registry
      • Updating a registry
      • Deleting a registry
    • Managing a repository
      • Getting information about existing repositories
    • Managing policies for automatically deleting Docker images
      • Getting information about existing lifecycle policies
      • Creating a lifecycle policy
      • Updating a lifecycle policy
      • Performing lifecycle policy dry runs
      • Deleting a lifecycle policy
    • Working with roles
      • Assign a role
      • Viewing assigned roles
      • Revoke a role
  • Yandex Container Solution
  • Use cases
    • All use cases
    • Running a Docker image on a VM
  • Concepts
    • Overview
    • Docker image
    • Registry
    • Repository
    • Policies for automatically deleting Docker images
    • Backups
    • Quotas and limits
  • Access management
  • Pricing policy
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • ImageService
      • LifecyclePolicyService
      • RegistryService
      • RepositoryService
      • ScannerService
      • OperationService
    • REST
      • Overview
      • Image
        • Overview
        • delete
        • get
        • list
      • LifecyclePolicy
        • Overview
      • Registry
        • Overview
        • create
        • delete
        • get
        • list
        • listAccessBindings
        • setAccessBindings
        • update
        • updateAccessBindings
      • Repository
        • Overview
        • get
        • list
        • listAccessBindings
        • setAccessBindings
        • updateAccessBindings
      • Scanner
        • Overview
  • Troubleshooting
  • Questions and answers
  1. Getting started

Getting started with Container Registry

  • Before you start
  • Creating a registry and performing basic operations on Docker images

Using these instructions, you will create your first registry and try managing Docker images.

Before you start

To create a registry, you'll need a folder in Yandex.Cloud. If you don't have any folders yet, create a new folder:

  1. Click Create folder in the Home page of the management console.

  2. Enter the folder name.

    • Length — from 3 to 63 characters.
    • The name may contain lowercase Latin letters, numbers, and hyphens.
    • The first character must be a letter. The last character can't be a hyphen.
  3. Select Create a default network. A network is created with subnets in each availability zone.

  4. Click Create.

You'll also need the Yandex CLI and Docker.

Creating a registry and performing basic operations on Docker images

  1. 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 need the received id to access the created registry.

  2. Authenticate in Container Registry using a Docker Credential helper:

    1. Configure Docker to use docker-credential-yc:

      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.

    2. Make sure that Docker is configured.

      The /home/<user>/.docker/config.json file must contain the following line:

      "cr.yandex": "yc"
      
  3. Pull a Docker image from the Docker Hub repository:

    docker pull ubuntu
    
  4. Assign a tag like cr.yandex/<registry ID>/<Docker image name>:<tag> to the Docker image pulled:

    docker tag ubuntu \
    cr.yandex/crpc9qeoft236r8tfalm/ubuntu:hello
    
  5. Push the Docker image to the repository Container Registry:

    docker push \
    cr.yandex/crpc9qeoft236r8tfalm/ubuntu:hello
    
  6. Run the Docker image:

    docker run \
    cr.yandex/crpc9qeoft236r8tfalm/ubuntu:hello
    

See also

  • Creating a registry
  • Authentication in Container Registry
  • Creating a Docker image
  • Pushing a Docker image
  • Pull a Docker image
  • Running a Docker image on a VM
In this article:
  • Before you start
  • Creating a registry and performing basic operations on Docker images
Language / Region
Careers
Privacy policy
Terms of use
Brandbook
© 2021 Yandex.Cloud LLC