Creating a remote registry
Note
You can create a remote registry in any format except binary.
-
In the management console
, select the folder where you want to create a remote registry. -
Navigate to Cloud Registry.
-
In the left-hand panel, select
Registries. -
In the top-right corner, click Create registry.
-
Select the registry format.
-
In the Registry type field, select
Remote. -
Select the source type:
-
Public: Public sourceRegistry format Public source addresses Maven Maven CentralGradle Plugin PortalAxiomNpm NpmDocker Docker HubNuGet NuGetPyPI PyPIPyPI TestNote
The
Axiompublic source is available on request. To get access toAxiom, create a request to support. -
Custom: Custom source.Specify your custom source address.
-
-
Select the authorization type:
Note
Authorization is is supported for custom sources and the
Docker Hubpublic source.Docker Hubonly supports theBasicauthorization type.-
None: Without authorization. -
Basic: Authorization by username and password. -
Bearer: Authorization by Bearer token.
-
-
If you selected
BasicorBearerauthorization:-
Create a Yandex Lockbox secret. Under Key, specify
value. In the Value field, specify the following:- Password, if using
Basicauthorization. - Bearer token, if using
Bearerauthorization.
- Password, if using
-
Grant access to the contents of the secret to the Cloud Registry service agent by assigning it the
lockbox.payloadViewerrole for this secret.Currently, you can only grant this access using the Yandex Cloud CLI command by specifying the ID of the Yandex Lockbox secret containing the password or Bearer token and the ID of the cloud you are creating the registry in:
yc lockbox secret add-access-binding \ --id <secret_ID> \ --role lockbox.payloadViewer \ --agent cloud-registry:data-plane \ --cloud-id <cloud_ID> -
In the registry settings, specify the username (if using
Basicauthorization) and the ID of the Yandex Lockbox secret you created.
-
-
Enter a name and description for the registry.
-
Add labels in
key: valueformat. -
Click Create.
To create a remote registry, run this command:
yc cloud-registry registry create \
--name <registry_name> \
--description <registry_description> \
--registry-kind <registry_format> \
--registry-type remote \
--properties <registry_properties>
Where:
-
--name: Registry name. -
--description: Registry description. -
--registry-kind: Registry format. Available formats:maven,npm,docker,nuget, andpypi. -
--registry-type: Registry type. -
--properties: Registry properties. Provide them as a string inname1=value1,name2=value2format. The available properties for remote registries are as follows:-
source: Source registry. You can specify a public source or a custom one. Available public sources:Registry format Public source addresses maven@maven-central@gradle-plugin-portal@axiomnpm@npmjsdocker@docker-hubnuget@nugetpypi@pypi@pypi-testNote
The
@axiompublic source is available on request. To get access to@axiom, create a request to support. -
authorizationType: Authorization type. Available authorization types:none,basic, andbearer. The default value isnone.Note
Authorization is supported for custom sources and the
@docker-hubpublic source.@docker-hubonly supports thebasicauthorization type.If you selected
basicorbearerauthorizationType:-
Create a Yandex Lockbox secret. Set the
keyparameter tovalueand define the key value as follows:- Enter the password if
authorizationTypeis set tobasic. - Specify the bearer token if
authorizationTypeis set tobearer.
- Enter the password if
-
Grant access to the contents of the secret to the Cloud Registry service agent by assigning it the
lockbox.payloadViewerrole for this secret.Run the command below, specifying the ID of the Yandex Lockbox secret containing the password or bearer token and the ID of the cloud you are creating the registry in:
yc lockbox secret add-access-binding \ --id <secret_ID> \ --role lockbox.payloadViewer \ --agent cloud-registry:data-plane \ --cloud-id <cloud_ID>
-
-
authorizationSecretId: ID of the user secret that stores the password or bearer token. It is required ifauthorizationTypeis set tobasicorbearer. -
authorizationUsername: Username. It is required ifauthorizationTypeisbasic.
-
Result:
done (3s)
id: cn1fsnc2dak********
folder_id: b1gc1t4cb638********
name: my-first-registry
kind: DOCKER
type: REMOTE
status: ACTIVE
description: docker
created_at: "2024-11-30T16:11:12.901356Z"
modified_at: "2024-11-30T16:11:16.243323Z"
To create a remote registry, use the create REST API method for the Registry resource or the RegistryService/Create gRPC API call.
In the type field, specify REMOTE.