Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • 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. Step-by-step instructions
  2. Managing a registry
  3. Creating a registry

Creating a registry

    Any users and service accounts with folder access rights can use the created registry.

    Management console
    CLI
    API

    To create a registry:

    1. Open the Container Registry section in the folder where you want to create the registry.

    2. Click Create registry.

    3. Specify a name for the registry.

      • The name must be unique within the folder.
      • 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.
      • The maximum length of the name is 63 characters.
    4. Click Create registry.

    If you don't have the Yandex.Cloud command line interface yet, install and initialize it.

    The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name or --folder-id parameter.

    1. Make sure that a registry has not been created in the folder yet:

      $ yc container registry list
      +----+------+-----------+
      | ID | NAME | FOLDER ID |
      +----+------+-----------+
      +----+------+-----------+
      

      If the folder already contains a registry, see Updating a registry for information about how you can change it.

    2. Create a registry:

      $ yc container registry create --name my-reg
      ..done
      id: crpd50616s9a2t7gr8mi
      folder_id: b1g88tflru0ek1omtsu0
      name: my-reg
      status: ACTIVE
      created_at: "2019-01-09T14:34:06.601Z"
      
      • The name must be unique within the folder.
      • 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.
      • The maximum length of the name is 63 characters.

      Note:

      • The --name flag is optional: you can create a registry without any name and access it using the ID.
      • The name field is user-defined: it is used for listing in the YC CLI and is not used in the Docker CLI.
    3. Make sure the registry was created:

      $ yc container registry list
      +----------------------+--------+----------------------+
      |          ID          |  NAME  |      FOLDER ID       |
      +----------------------+--------+----------------------+
      | crpd50616s9a2t7gr8mi | my-reg | b1g88tflru0ek1omtsu0 |
      +----------------------+--------+----------------------+
      

    To create a registry, use the create method for the Registry resource.

    Language
    Careers
    Privacy policy
    Terms of use
    © 2021 Yandex.Cloud LLC