Creating a local registry
-
In the management console
, select the folder where you want to create a local 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
Local. -
If you set the registry format to:
-
Docker:-
Specify an artifact immutability policy:
Disabled: Use no policy.Simple: Prevent artifact overwriting.Full: Prevent artifact overwriting, even after the artifact is deleted.
-
Under Security, enable this option:
- Scan artifacts on push, to scan Docker images as they are pushed to the registry.
- Scan registry, to scan all Docker images stored in the registry. Specify the scan interval.
Warning
Docker image scanning is handled by the Vulnerability Management (VM) module, which is billed separately. For more information, see the Yandex Security Deck pricing policy.
-
-
Maven, specify a versioning policy:Mixed: A combination ofReleaseandSnapshotfor flexibility.Release: For stable versions.Snapshot: For development with frequent updates.
-
Debian, optionally, configure registry metadata signing:Enable Registry signing and specify the Yandex Lockbox secret containing the GPG key for signing. For more information on preparing a GPG key and creating a secret, see Preparing a GPG key.
-
-
Specify the filtering patterns.
-
Under Registry information:
- Enter the registry name. The name must not contain spaces or special characters.
- Optionally, enter a description and add registry labels in
key: valueformat.
-
Click Create.
To create a local registry, run this command:
yc cloud-registry registry create \
--name <registry_name> \
--description <registry_description> \
--registry-kind <registry_format> \
--registry-type local \
--properties <registry_properties>
Where:
-
--name: Registry name. -
--description: Registry description. -
--registry-kind: Registry format. Available formats:maven,npm,docker,debian,nuget,pypi,binary,go. -
--registry-type: Registry type. -
--properties: Registry properties. Provide them as a string inname1=value1,name2=value2format. The available properties for local registries are as follows:-
immutable-artifacts-policy: Artifact immutability policy. It is only supported for thedockerregistry format. Here are the available policy options:disabled: Do not use the policy.simple: Prevent artifact overwriting.full: Prevent artifact overwriting, even after the artifact is deleted.
The default value is
disabled. -
version-policy: Versioning policy. It is only supported for themavenregistry format. Here are the available policy options:mixed: A combination ofreleaseandsnapshotfor flexibility.release: For stable versions.snapshot: For development with frequent updates.
The default value is
mixed. -
signingGpgKeySecretId: ID of the Yandex Lockbox secret containing the GPG key for signing the metadata. It is only supported for thedebianregistry format. For more information on preparing a GPG key and creating a secret, see Preparing a GPG key.
-
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 local registry, use the create REST API method for the Registry resource or the RegistryService/Create gRPC API call.
In the type field, specify LOCAL.