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: Do not use the policy.Simple: Prevent artifact overwriting.Full: Prevent artifact overwriting, even after the artifact is deleted.
-
Maven, specify a versioning policy:Mixed: A combination ofReleaseandSnapshotfor flexibility.Release: For stable versions.Snapshot: For development with frequent updates.
-
-
Enter a name and description for the registry.
-
Add 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,nuget,pypi, andbinary. -
--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.
-
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.