Creating a remote registry
Note
A remote registry can be created 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 source.Registry format Public source addresses Maven Maven CentralGradle Plugin PortalAxiomNpm NpmDocker Docker HubNuGet NuGetPyPI PyPIPyPI TestNote
You can get access to the
Axiompublic source on request. To activate access toAxiom, create a request to support. -
Custom: Custom source.Specify your custom source address.
-
-
Select the authorization type:
Note
Authorization is available for custom sources and the
Docker Hubpublic source. ForDocker Hub, only theBasicauthorization type is available.-
None: Without authorization. -
Basic: Authorization by username and password. -
Bearer: Authorization by Bearer token.
-
-
If
BasicorBeareris your selected authorization type:-
Create a Yandex Lockbox secret. In the Key field, specify
value. In Value, specify as follows:- Password, for the
Basicauthorization type. - Bearer token, for the
Bearerauthorization type.
- Password, for the
-
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 the authorization type is
Basic) 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. Available properties for remote registries are as follows:-
source: Source registry. You can specify a public source or a custom one. Available public sources are as follows:Registry format Public source addresses maven@maven-central@gradle-plugin-portal@axiomnpm@npmjsdocker@docker-hubnuget@nugetpypi@pypi@pypi-testNote
You can get access to the
@axiompublic source on request. To activate access to@axiom, create a request to support. -
authorizationType: Authorization type. Available authorization types:none,basic, andbearer. The default value isnone.Note
Authorization is available for custom sources and the
@docker-hubpublic source. For@docker-hub, only thebasicauthorization type is available.If
basicorbeareris your specifiedauthorizationType:-
Create a Yandex Lockbox secret. Set the
keyparameter tovalue; set the key value as follows:- Password, where
authorizationTypeset tobasic. - Bearer token, where
authorizationTypeset tobearer.
- Password, where
-
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 while 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 whereauthorizationTypeis 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.