Creating a registry
-
In the management console
, select the folder you want to create a registry in. -
In the list of services, select Cloud Registry.
-
In the left-hand panel, select
Registries. -
In the top-right corner, click Create registry.
-
Select the registry format.
-
Configure the registry format:
-
In the Registry type field, select the preferred registry type:
Local
: Local registry. This type is available for all registry formats.Remote
: Remote registry. This type is available for theMaven
,Npm
, andDocker
formats.Virtual
: Virtual registry. This type is available for theMaven
,Npm
, andDocker
formats.
-
If you select
Maven
for format andLocal
for type, select a version policy in the Version policy field:Release
: For stable versions.Snapshot
: For development with frequent updates.Mixed
: A combination ofRelease
andSnapshot
for flexibility.
-
If you select
Remote
for type, select the remote registry's address:-
For
Maven
, the available repositories areMaven Central
andAxiom
.Note
You get access to
Axiom
on request. To activate access toAxiom
, create a request to support. -
For
Npm
, you can only use theNpm
repository. -
For
Docker
, you can only use theDocker Hub
repository. You have to specify authentication data forDocker Hub
.-
Grant access to the contents of the Yandex Lockbox secret to the Cloud Registry service agent by assigning it the
lockbox.payloadViewer
role 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 token or password 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>
-
Select the authentication method in
Docker Hub
:- To authenticate with an access token
, select theBearer
authentication option and, in the Secret ID in Lockbox field, select the Yandex Lockbox secret with this token in itsvalue
key. - For authentication with a username and password, select the
Basic
authentication option and, in the Secret ID in Lockbox field, select the Yandex Lockbox secret with this password in itsvalue
key.
- To authenticate with an access token
-
-
-
If you selected the
Virtual
registry type, use the Add registry button in the Registries field 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.
-
-
Enter a name and description for the registry.
-
Click Create.
To create a registry, run this command:
yc cloud-registry registry create \
--name <registry_name> \
--description <registry_description> \
--registry-kind <registry_format> \
--registry-type <registry_type>
Where:
--name
: Registry name.--description
: Registry description.--registry-kind
: Registry format. The available values aremaven
,npm
, anddocker
.--registry-type
: Registry type. The available values arelocal
,remote
, andvirtual
.
Result:
done (3s)
id: cn1fsnc2dak********
folder_id: b1gc1t4cb638********
name: my-first-registry
kind: DOCKER
type: LOCAL
status: ACTIVE
description: docker
created_at: "2024-11-30T16:11:12.901356Z"
modified_at: "2024-11-30T16:11:16.243323Z"
To create a registry, use the create REST API method for the Registry resource or the RegistryService/Create gRPC API call.