Creating a virtual registry
-
In the management console
, select the folder where you want to create a virtual 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
Virtual. -
Under Registries, use the
Add registry button to add local and/or remote registries to the virtual registry by specifying their IDs. You can look up the registry ID in the management console on the registry info page.In the Registry access field, select:
Read onlyto grant read-only access to the added registries.Read and uploadto grant both read and upload access to the registries. You can only use one registry for uploads. Specify it in the Deployment registry field.
-
Enter a name and description for the registry.
-
Add labels in
key: valueformat. -
Click Create.
To create a virtual registry, run this command:
yc cloud-registry registry create \
--name <registry_name> \
--description <registry_description> \
--registry-kind <registry_format> \
--registry-type virtual \
--properties <registry_properties>
Where:
-
--name: Registry name. -
--description: Registry description. -
--registry-kind: Registry format. Available formats:maven,npm,docker,nuget,pypi, andbinary. -
--registry-type: Registry type. -
--properties: Registry properties. Provide them as a string inname1=value1,name2=value2format. Available properties for virtual registries are as follows:registryIds: List of local and remote registry IDs in the order of their traversal. Provide inregistryIds=registry1;registry2format.readOnly: Permission to push artifacts to the registry. Possible values:trueto deny orfalseto allow pushing.deploymentRegistryId: ID of the registry to push artifacts to. It is required ifreadOnlyisfalse.
Result:
done (3s)
id: cn1fsnc2dak********
folder_id: b1gc1t4cb638********
name: my-first-registry
kind: DOCKER
type: VIRTUAL
status: ACTIVE
description: docker
created_at: "2024-11-30T16:11:12.901356Z"
modified_at: "2024-11-30T16:11:16.243323Z"
To create a virtual registry, use the create REST API method for the Registry resource or the RegistryService/Create gRPC API call.
In the type field, specify VIRTUAL.