[Yandex Cloud documentation](../../index.md) > [Yandex Container Registry](../index.md) > Getting started

# Getting started with Container Registry

Use this guide to create your first [registry](../concepts/registry.md) and try your hand at managing [Docker images](../concepts/docker-image.md).

## Getting started {#before-you-begin}

To create a registry, you will need a folder in Yandex Cloud. If you do not have any folders yet, create one before creating a registry:

1. In the [management console](https://console.yandex.cloud), in the top panel, click ![image](../../_assets/console-icons/layout-side-content-left.svg) or ![image](../../_assets/console-icons/chevron-down.svg) and select the [cloud](../../resource-manager/concepts/resources-hierarchy.md#cloud).
1. To the right of the cloud name, click ![image](../../_assets/console-icons/ellipsis.svg).
1. Select ![image](../../_assets/console-icons/plus.svg) **Create folder**.

   ![create-folder1](../../_assets/resource-manager/create-folder-1.png)

1. Give your [folder](../../resource-manager/concepts/resources-hierarchy.md#folder) a name. The naming requirements are as follows:

    * Length: between 3 and 63 characters.
    * It can only contain lowercase Latin letters, numbers, and hyphens.
    * It must start with a letter and cannot end with a hyphen.

1. Optionally, specify the description for your folder.
1. Select **Create a default network**. This will create a [network](../../vpc/concepts/network.md#network) with subnets in each availability zone. Within this network, you will also have a [default security group](../../vpc/concepts/security-groups.md#default-security-group), within which all network traffic will be allowed.
1. Click **Create**.

   ![create-folder2](../../_assets/resource-manager/create-folder-2.png)

To work with Container Registry and Docker images, [install the Yandex Cloud CLI](../../cli/operations/install-cli.md) and [configure](../operations/configure-docker.md) Docker.

## Creating a registry and performing basic operations on Docker images {#registry-create}

1. Create a registry in Container Registry:

   ```bash
   yc container registry create --name my-first-registry
   ```

   Result:

   ```text
   ..done
   id: crpc9qeoft23********
   folder_id: b1g0itj57rbj********
   name: my-first-registry
   status: ACTIVE
   created_at: "2018-12-25T12:24:56.286Z"
   ```

   You will use the received `ID` to access the created registry later.
1. Authenticate in Container Registry using [Docker Credential helper](../operations/authentication.md#cred-helper):
   1. Configure Docker to use `docker-credential-yc`:

      ```bash
      yc container registry configure-docker
      ```

      Result:

      ```text
      Credential helper is configured in '/home/<user>/.docker/config.json'
      ```

      During setup, information about the current user profile is saved.
   1. Make sure that Docker is configured.

      The following line must appear in the `/home/<user>/.docker/config.json` configuration file:

      ```json
      "cr.yandex": "yc"
      ```

1. Pull a Docker image from [Docker Hub](https://hub.docker.com):

   ```bash
   docker pull ubuntu
   ```

1. Assign the pulled Docker image a tag in this format: `cr.yandex/<registry_ID>/<Docker_image_name>:<tag>`:

   ```bash
   docker tag ubuntu \
   cr.yandex/<registry_ID>/ubuntu:hello
   ```

1. Push the Docker image to the repository Container Registry:

   ```bash
   docker push \
   cr.yandex/<registry_ID>/ubuntu:hello
   ```

1. Run the Docker image:

   ```bash
   docker run \
   cr.yandex/<registry_ID>/ubuntu:hello
   ```

#### See also {#see-also}

* [Creating a registry](../operations/registry/registry-create.md).
* [Authentication in Container Registry](../operations/authentication.md).
* [Creating a Docker image](../operations/docker-image/docker-image-create.md).
* [Pushing a Docker image](../operations/docker-image/docker-image-push.md).
* [Pulling a Docker image](../operations/docker-image/docker-image-pull.md).
* [Running a Docker image on a VM](../tutorials/index.md).