Creating a registry

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

    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 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 has been 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.