> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nebius.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting started with Container Registry: Create your first registry and manage a Docker image in it

Container Registry helps to manage Docker images for your resources.

This guide covers how to set up your environment to work with the service, create your first *registry*, upload and run a Docker image in it.

## Prepare your environment

In this guide, you will use the terminal in your environment, e.g. on your local machine, to run commands that create and manage Nebius AI Cloud resources. The commands use the Nebius AI Cloud CLI and tools that you need to install first.

1. Install Docker Engine:

   * [Ubuntu](https://docs.docker.com/engine/install/ubuntu/)
   * [macOS](https://docs.docker.com/desktop/install/mac-install/)

2. Install **jq** which parses JSON outputs from the Nebius AI Cloud CLI and extracts resource IDs for other commands:

   <CodeGroup>
     ```bash Ubuntu theme={null}
     sudo apt-get install jq
     ```

     ```bash macOS theme={null}
     brew install jq
     ```
   </CodeGroup>

3. Install the **Nebius AI Cloud CLI** ([how to install](../cli/install)) which manages all Nebius AI Cloud resources:

   ```bash theme={null}
   curl -sSL https://storage.eu-north1.nebius.cloud/cli/install.sh | bash
   ```

4. Configure the **Nebius AI Cloud CLI**:

   ```bash theme={null}
   nebius profile create
   ```

   The last command, `nebius profile create`, will guide you through several prompts. After you complete the prompts, your browser will open the Nebius AI Cloud web console sign-in screen. Sign in to the web console to complete the initialization. If you have access to multiple tenants, the CLI will prompt you to choose a tenant ID. After that, save your project ID in the CLI configuration:

   If the project ID has not been configured during the `nebius profile create` flow, [get the project ID](/iam/manage-projects#how-to-get-a-project-id) and save it in the CLI configuration:

   ```bash theme={null}
   nebius config set parent-id <project_ID>
   ```

5. Create an environment variable for the [region](/overview/regions) in which your project is located:

   ```bash theme={null}
   export NB_REGION_ID=<region_ID>
   ```

## Create a registry

Create a test registry and save a part of its ID to an environment variable:

```bash theme={null}
export NB_REGISTRY_PATH=$(nebius registry create \
  --name quickstart-registry \
  --format json | jq -r ".metadata.id" | cut -d- -f 2)
```

## Configure Docker

Configure Docker to work with the created registry:

1. Run the Nebius AI Cloud Docker credential helper. It lets you use Nebius AI Cloud registries without running the `docker login`.

   ```bash theme={null}
   nebius registry configure-helper
   ```

2. Check that the credential helper is configured:

   1. Open the file from the previous command output, for example, with the `cat` command:

      ```sh theme={null}
      cat /Users/user/.docker/config.json
      ```

   2. Check that the `credHelpers` property contains the following lines:

      ```json theme={null}
      "cr.eu-north1.nebius.cloud": "nebius"
      "cr.eu-north2.nebius.cloud": "nebius"
      "cr.eu-west1.nebius.cloud": "nebius"
      "cr.me-west1.nebius.cloud": "nebius"
      "cr.uk-south1.nebius.cloud": "nebius"
      "cr.us-central1.nebius.cloud": "nebius"
      ```

## Push and run a Docker image

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

   ```bash theme={null}
   docker pull hello-world
   ```

   Do not run the command as root.

2. Assign the image a tag:

   ```bash theme={null}
   docker tag hello-world \
     cr.$NB_REGION_ID.nebius.cloud/$NB_REGISTRY_PATH/hello-world:hello
   ```

3. Push the image to the Container Registry:

   ```bash theme={null}
   docker push cr.$NB_REGION_ID.nebius.cloud/$NB_REGISTRY_PATH/hello-world:hello
   ```

   Do not run the command as root.

4. Run the image:

   ```bash theme={null}
   docker run cr.$NB_REGION_ID.nebius.cloud/$NB_REGISTRY_PATH/hello-world:hello
   ```
