> ## Documentation Index
> Fetch the complete documentation index at: https://gcore-doc-1046.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Container Registry

Container Registry provides a centralized location for all OCI-compatible artifacts, such as container images and Helm charts, making it easy to view and manage them in one place.

Use the following steps to add a new registry. For instructions on how to manage an existing registry, check out our [dedicated guide](/cloud/container-registry/manage-container-registries).

To create and manage the Container Registry, you need to have the [Project Administrator](/cloud/getting-started/projects/users/user-roles-and-rights#project-administrator) or [Client Administrator](/cloud/getting-started/projects/users/user-roles-and-rights#client-administrator) permissions.

## Step 1. Add a registry to the customer portal

Start by creating a registry to which you will push OCI-compatible artifacts:

1\. In the Gcore Customer Portal, navigate to **Cloud** > **Container Registries**.

2\. Click **Create Container Registry**.

<Frame>
  <img src="https://mintcdn.com/gcore-doc-1046/Cf8gHikmtl4aL2hb/images/docs/cloud/container-registry/create-container-registry/container-registry-page-create.png?fit=max&auto=format&n=Cf8gHikmtl4aL2hb&q=85&s=a31e7c5117b71062eb086f529b81f7f3" alt="Container registry page in the Customer Portal" width="4244" height="1520" data-path="images/docs/cloud/container-registry/create-container-registry/container-registry-page-create.png" />
</Frame>

3\. Choose the region for the registry location. If you plan to store and manage images for other Gcore services, select the same region where those services are created.

4\. Specify the registry name.

<Tip>
  **Tip**

  A registry name should consist of lowercase Latin characters, which can be separated by dashes.
</Tip>

5\. Indicate the storage limit. It defines the amount of data that can be stored within the registry, including Docker images, artifacts, and image versions.

6\. Click **Create Registry**.

<Frame>
  <img src="https://mintcdn.com/gcore-doc-1046/Cf8gHikmtl4aL2hb/images/docs/cloud/container-registry/create-container-registry/create-registry.png?fit=max&auto=format&n=Cf8gHikmtl4aL2hb&q=85&s=acbefd490b164b8e4bca88f9886363e8" alt="Create Container registry dialog in the Customer Portal" width="1099" height="626" data-path="images/docs/cloud/container-registry/create-container-registry/create-registry.png" />
</Frame>

The registry will appear along with the other registries on the **Container Registries** page.

## Step 2. Create a user

To push and pull images from the registry, you need to authenticate as a particular user who has the required permissions for such operations.

To add a new user to the registry:

1\. Click the registry name to open it.

2\. Open the **Users** tab and click **Add users**.

<Frame>
  <img src="https://mintcdn.com/gcore-doc-1046/Cf8gHikmtl4aL2hb/images/docs/cloud/container-registry/create-container-registry/users-tab-empty.png?fit=max&auto=format&n=Cf8gHikmtl4aL2hb&q=85&s=5fc75457a537ef56e1395d0763b2a213" alt="Users tab with no users created" width="4036" height="1244" data-path="images/docs/cloud/container-registry/create-container-registry/users-tab-empty.png" />
</Frame>

3\. Configure the user and its access:

* **Username** : Enter a username. It should consist of lowercase Latin characters, which can be separated by dashes.

* **Permissions** : Allow a user to either push or pull images to the registry or do both operations.

* **Set activity duration** : enable this toggle to set the expiration date for user credentials. If you leave the toggle disabled, the user will retain indefinite access to the registry.

4\. Click **Save**.

<Frame>
  <img src="https://mintcdn.com/gcore-doc-1046/Cf8gHikmtl4aL2hb/images/docs/cloud/container-registry/create-container-registry/add-user.png?fit=max&auto=format&n=Cf8gHikmtl4aL2hb&q=85&s=7065d5be479f3ffbb366de4e0c078034" alt="Add users dialog" width="934" height="360" data-path="images/docs/cloud/container-registry/create-container-registry/add-user.png" />
</Frame>

5\. Copy and save the generated user password because you won't be able to check it again. If you forget the password, you'll have to regenerate it.

<Frame>
  <img src="https://mintcdn.com/gcore-doc-1046/Cf8gHikmtl4aL2hb/images/docs/cloud/container-registry/create-container-registry/save-password.png?fit=max&auto=format&n=Cf8gHikmtl4aL2hb&q=85&s=5b88791ae01ef06e7494285f831fb213" alt="A dialog with a username and password" width="1849" height="610" data-path="images/docs/cloud/container-registry/create-container-registry/save-password.png" />
</Frame>

You can now log in as the created user and push or pull images from the Container Registry, as described in the following steps.

## Step 3. Push your image to the container registry

When you open a registry, you can view the sample push and pull commands by clicking the relevant buttons.

<Frame>
  <img src="https://mintcdn.com/gcore-doc-1046/Cf8gHikmtl4aL2hb/images/docs/cloud/container-registry/create-container-registry/push-pull-commands.png?fit=max&auto=format&n=Cf8gHikmtl4aL2hb&q=85&s=a9da3d6d2ebdd865fab90de42abc3f72" alt="Registry overview page with highlighted push and pull buttons" width="3936" height="904" data-path="images/docs/cloud/container-registry/create-container-registry/push-pull-commands.png" />
</Frame>

To push a Docker image to the registry:

1\. Log in to the registry: docker login `<your-registry-endpoint>`. For example, `docker login registry.luxembourg-2./10-01-test/`.

2\. Enter the username of the user created in [Step](/cloud/container-registry/create-container-registry#step-2-create-a-user).

3\. Enter the user password.

4\. After you enter the credentials, you should see the "Login succeeded" message.

5\. (Optional) Tag your image: `docker tag source_image:tag target_repository:target_tag`.

6\. Push an image to the registry: `docker push <your-registry-endpoint/your-Docker-image>`.

The image will appear in the Container Registry on the **Images** tab.

<Frame>
  <img src="https://mintcdn.com/gcore-doc-1046/Cf8gHikmtl4aL2hb/images/docs/cloud/container-registry/create-container-registry/images-tab.png?fit=max&auto=format&n=Cf8gHikmtl4aL2hb&q=85&s=1d44a9ae4f06bd7a44098d5d9be58173" alt="Registry overview page with highlighted images tab" width="4180" height="2220" data-path="images/docs/cloud/container-registry/create-container-registry/images-tab.png" />
</Frame>

For instructions on how to view and manage images, check out the [Manage Container Registries](/cloud/container-registry/manage-container-registries) guide.

## Step 4 (Optional). Pull the image from the container registry

If you want to test how to pull the image and verify that everything works as expected, use the following command:

```sh theme={null}
docker pull <your-registry-endpoint/your-Docker-image> 
```

The image will be pulled locally.
