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:
-
Open the Container Registry section in the folder where you want to create the registry.
-
Click Create registry.
-
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.
-
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.
-
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.
-
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.
-
Make sure the registry was created:
$ yc container registry list +----------------------+--------+----------------------+ | ID | NAME | FOLDER ID | +----------------------+--------+----------------------+ | crpd50616s9a2t7gr8mi | my-reg | b1g88tflru0ek1omtsu0 | +----------------------+--------+----------------------+