---
title: "Container Registry: quick start"
sidebar_label: "Quick start"
description: "How to start working with Container Registry: create a registry, get a token, log in to the Docker CLI, upload and download an image"
sidebar_position: 2
---

import Formbricks from '@theme/MDXComponents/Formbricks'

# Container Registry: quick start

1. [Create a registry](#create-registry).
2. [Generate a token](#generate-token).
3. [Log in to the Docker CLI](#log-in-to-docker-cli).
4. [Upload an image](#upload-image).
5. [Download an image](#download-image).

## 1. Create a registry \{#create-registry}

1. In the [Control panel](https://my.selectel.ru/vpc/default/craas/), on the top menu, click **Products** and select **Container Registry**.

2. Open the **Registries** tab.

3. Click **Create registry**.

4. Enter a registry name. The name will be part of its URI:

   ```bash
   cr.selcloud.ru/<registry>
   ```

   Specify `<registry>` — the registry name.

5. Click **Create**.

## 2. Generate a token \{#generate-token}

To configure access to registries, generate a token. You can select the token expiration date, access rights, and the registries the token provides access to.

1. In the [Control panel](https://my.selectel.ru/vpc/default/craas/), on the top menu, click **Products** and select **Container Registry**.

2. Open the **Tokens** tab.

3. Click **Generate token**.

4. Enter a token name.

5. Select access rights:

   * read-only — downloading images and charts from the registry will be available;
   * write and read — adding, downloading, and deleting images and charts from the registry will be available.

6. Select the registry you want to grant access to. If you grant access to all registries, the token will also be valid for new registries you create in this project.

7. Select the token validity period:

   * 30 days;
   * 60 days;
   * 90 days;
   * 1 year;
   * indefinite.

8. Click **Generate token**.

9. Save the authorization data — copy the username (username) and password (password) or download the token in `.json` format.

## 3. Log in to the Docker CLI \{#log-in-to-docker-cli}

Working with the Docker CLI requires the token and authorization data you obtained in the previous step.

1. Open the CLI.

2. Log in to Docker:

   ```bash
   docker login cr.selcloud.ru
   ```

3. Enter the username (username) and password (password) for the token that you [generated](#generate-token).

## 4. Upload an image \{#upload-image}

1. Assign a tag to the image:

   ```bash
   docker tag <image> cr.selcloud.ru/<registry>/<image>:<tag>
   ```

   Specify:

   * `<image>` — image name, can be viewed using `docker image list`;
   * `<registry>` — name of the registry to which to upload the image;
   * `<tag>` — tag.

2. Upload the image to the registry:

   ```bash
   docker push cr.selcloud.ru/<registry>/<image>:<tag>
   ```

## 5. Download an image \{#download-image}

Download the image from the registry:

```bash
docker pull cr.selcloud.ru/<registry>/<image>:<tag>
```

Specify:

* `<registry>` — name of the registry from which to download the image;
* `<image>` — image name, can be viewed using `docker image list`;
* `<tag>` — tag.

<Formbricks />
