DigitalOcean Container Registry Quickstart

Create a Registry

To create a registry in the control panel:

  1. Visit the registry page.
  2. Enter a name for your registry. This name must:
    • Be unique across all DigitalOcean container registries
    • Be no more than 63 characters in length
    • Contain only lowercase letters, numbers, and/or hyphens
    • Begin with a letter
    • End with a letter or number
  3. Select your subscription plan and click Create Registry.

To create a registry using the command-line:

  1. Install doctl and authenticate it with an API token.

  2. Use the registry create command to create your registry:

    doctl registry create <my-registry-name>

Push to Your Registry

To push a Docker image to your registry:

  1. Install doctl and authenticate it with an API token.

  2. Use the registry login command to authenticate Docker with your registry:

    doctl registry login
  3. Use the docker tag command to tag your image with the fully qualified destination path:

    docker tag <my-image><my-registry>/<my-image>
  4. Use the docker push command to upload your image:

    docker push<my-registry>/<my-image>

    If you push a new image using an existing tag, the tag gets updated but the old image is still accessible by its digest and takes up space in your registry. To reduce your storage usage, you can delete the untagged images and then run garbage collection.


Because image manifests are cached in different regions, there may be a maximum delay of one hour between pushing to a tag that already exists in your registry and being able to pull the new image by tag. This may happen, for example, when using the :latest tag. To avoid the delay, use:

  • Unique tags (other than :latest)
  • SHA hash of the new manifest

Use Images in Your Registry with Kubernetes

To create containers from the images stored in your registry from the control panel:

  1. Visit the registry page and click the Settings tab.
  2. In the DigitalOcean Kubernetes integration section, click Edit to display the available Kubernetes clusters.
  3. Select the clusters and click Save.

The default service account in each of those namespaces is updated to include the secret in its image pull secret.

Use Images in Your Registry with App Platform

  1. Visit the Apps page and either click Create App if starting from scratch, or click an existing app to add your container image to your solution.
    • If adding an image to an existing solution, click the Settings tab. Click the Add Component button and then click Web Service, Worker, or Job.
  2. Select DigitalOcean Container Registry as the source for your code, choose the image you would like to use from the Repository drop-down and select the tag of the image you would like to deploy.
  3. Configure any details such as HTTP routes, environment variables, the run command, or the HTTP port.
  4. On the next page, give your new component a name.
  5. Select the plan and instance size you would like to use when a container is created from the image.

When updating the source image tag, a new deployment will be triggered. If the actual tag name has not changed, it is not guaranteed to pull down a fresh copy of the image due to caching. The recommended approach is to use unique tag names for all image updates.

Manage Images

To view or delete images in your registry:

  1. Navigate to Container Registry in the control panel.

    If you have a live registry and you have pushed images to your registry, they will be listed.

  2. Click the plus (+) sign next to each image to see tagged image versions

  3. Click More next to the tagged image version and select Delete. In the Delete tag dialog box:

    • To delete the tag of the image, specify the registry name and click Destroy.
    • To delete the manifest of the image by its digest, select the Delete associated digests checkbox, specify the registry name and then click Destroy.

Deleting an image by its tag or manifest does not delete the image layers. If you delete the image manifest manually, you can subsequently run garbage collection to delete the image layers and free up space in your registry. Additionally, you can delete all untagged manifests when running a garbage collection. For more information, see Clean Up Container Registry.

Use the checkboxes to delete multiple image versions in bulk.

Delete Your Registry

To delete your registry using the control panel:

  1. Navigate to Container Registry in the control panel.
  2. Click the Actions drop-down, and select Destroy.

To delete your registry on the command-line, use the registry delete command:

doctl registry delete