Getting information about existing repositories
Getting a list of repositories in a registry
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.
-
See the description of the CLI command for getting a list of repositories:
yc container repository list --help -
Get a list of repositories.
-
To get a list of all repositories in all registries in the current folder, run this command:
yc container repository listResult:
+----------------------+-----------------------------+ | ID | NAME | +----------------------+-----------------------------+ | crp8bu81b5af******** | crp0pmf1n68t********/ubuntu | | crps9c63evii******** | crpl3738e9v1********/ubuntu | +----------------------+-----------------------------+ -
To get a list of all repositories in a particular registry, run this command:
yc container repository list --registry-id <registry_ID>Result:
+----------------------+-----------------------------+ | ID | NAME | +----------------------+-----------------------------+ | crp8bu81b5af******** | crp0pmf1n68t********/ubuntu | +----------------------+-----------------------------+
-
To get a list of repositories in a registry, use the List method for the Repository resource.
Note
The repository appears in the list as soon as you push at least one Docker image to it.
Getting information about a repository
-
See the description of the CLI command for getting repository information:
yc container repository get --help -
Get information about the repository.
-
By repository ID:
yc container repository get --id <repository_ID>Result:
name: crp0pmf1n68t********/ubuntu id: crp8bu81b5af******** -
By repository name:
yc container repository get --name <repository_name>Result:
name: crp0pmf1n68t********/ubuntu id: crp8bu81b5af********You can specify both the full Docker image name and prefixes. For example, you can get information about the
crpvplula8p3********/myproject/myservicerepository by specifyingcrpvplula8p3********/myproject/myservice,crpvplula8p3********/myproject, orcrpvplula8p3********.
-
Get information about the repository.
-
By repository ID:
Use the Get method for the Repository resource. Specify the repository ID in the
repositoryIdproperty. -
By repository name:
Use the GetByName method for the Repository resource. Specify the repository name in the
repositoryNameproperty.
You can get a list of repositories in a registry by using the List method for the Repository resource.