Skip to main content
Container Registry: quick start
Last update:

Container Registry: quick start

  1. Create a registry.
  2. Generate a token.
  3. Authorize in the Docker CLI.
  4. Download the image.
  5. Download the image.

1. Create a registry

  1. In the Control Panel, on the top menu, click Products and select Container Registry.

  2. Open the Registries tab.

  3. Click Create Registry.

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

    cr.selcloud.ru/<registry>

    Specify <registry> as the name of the registry.

  5. Click Create.

2. Generate token

To customize access to registries, generate a token. You can select the token validity period, access rights, and registries to which the token gives access.

  1. In the Control Panel, on the top menu, click Products and select Container Registry.

  2. Open the Tokens tab.

  3. Click Generate token.

  4. Enter the name of the token.

  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 to which you want to grant access. If you grant access to all registries, the token will also be valid for new registries that you will create in this project.

  7. Select the validity period of the token:

    • 30 days;
    • 60 days;
    • 90 days;
    • 1 year;
    • indefinite.
  8. Click Generate token.

  9. Save the data for authorization with the token — copy username and password or download the token in .json format.

3. Log in to the Docker CLI

To work with the Docker CLI, you need the token and authorization data you received in the previous step.

  1. Open the CLI.

  2. Authorize Docker:

    docker login cr.selcloud.ru
  3. Enter the username and password for the token you generated.

4. Download the image

  1. Assign a tag to the image:

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

    Specify:

    • <image> — image name, can be viewed with docker image list;
    • <registry> — name of the registry where you want to load the image;
    • <tag> — Tag.
  2. Load the image into the registry:

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

5. Download image

Download an image from the registry:

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

Specify:

  • <registry> — name of the registry from which you want to download the image;
  • <image> — image name, can be viewed with docker image list;
  • <tag> — Tag.