Create your FREE Codefresh account and start making pipelines fast. Create Account

Using the DigitalOcean Container Registry with Codefresh

3 min read

DigitalOcean has just announced the DigitalOcean Container Registry, which is directly integrated into the DigitalOcean Dashboard. While you can use any Container Registry in your DigitalOcean resources, the goal of the Container Registry is to provide for easy connection between the Container Registry and DigitalOcean Kubernetes resources.

DigitalOcean Container Registry Dashboard


Whether you have already integrated DigitalOcean cloud resources into your Codefresh pipelines or not, you could use the DigitalOcean Container Registry like any other container registry in your Codefresh Pipeline.


The DigitalOcean Container Registry provides:

Furthermore, the DigitalOcean Container Registry is not just for containers. It allows users to store any artifacts that are compatible with the OCI specifications. This allows you to keep Helm Charts in your DigitalOcean Container Registry (note that Helm’s OCI support is still experimental).

Building and pushing a Container image with DigitalOcean and Codefresh

The set-up will only take 4 steps, assuming that you have a

First, we have to set-up our Container Registry in DigitalOcean. This can be done by opening your account and accessing the “Container Registry” section:

Set-up Container Registry UI

Since we are already in DigitalOcean, we can go ahead and create our access token. Open API in the bottom left of the Account page (below Settings). And create a new token at Tokens/Keys. The token needs to have both read and write permissions. Make sure to take note of the token since we will need it in the next step.

Now we can add the DigitalOcean Container registry to our Docker registries in Codefresh. For this, open:

Codefresh Account => Account Settings (bottom left) => Docker Registries => Integrations => Docker Registries => Add Registry Provider => Other Registries

This should get you to the following screen. As you can see, Codefresh supports a variety of Container Registries:

Codefresh Registry Settings

Next, we have to provide the configuration information for the DigitalOcean Container Registry. For this, you will need our DigitalOcean Access Token. The token is used both as username and as password.

DigitalOcean Registry Settings

The URL is going to be — you can then provide the registry name in the advanced options (alternatively, you could include it in your build step before the image name).

That’s it! Now we can push images from our Codefresh Pipeline directly to the DigitalOcean Container Registry. Note that if DigitalOcean is not set as your default registry, you have to define the registry in your build step:

registry: "digital-ocean"

Our full build step will look as follow:

    title: "Building Docker image"
    type: "build"
    image_name: "anais-codefresh/react-article-display-do-registry"
      - "1.0.0"
    dockerfile: "Dockerfile"
    registry: "digital-ocean"

Different to other platforms, the Codefresh Build Step both builds AND pushes the image to the registry.

Running the image, we can see the step execute in the output section of our pipeline:

Codefresh pipeline with digital ocean step

And view the Container image directly in DigitalOcean:

Container image in Digital Ocean — built and pushed from Codefresh

Try it out TODAY!

We made it super easy for you to connect DigitalOcean Container Registry to your Codefresh pipeline. You can find more details in the Codefresh documentation.

Wait, you are not a Codefresh user yet? Create Your Free Account today!

This process works on all Codefresh accounts. You can set it up in minutes to try it out.

If you have any questions, feel free to ask in our community forum, we would love to hear from you.

Anais Urlichs

Anaïs is a former Developer Evangelist at Codefresh, the modern, fast, and powerful CI/CD & GitOps automation platform that streamlines your pipelines. When she is not advocating DevOps best practices, she runs her own YouTube Channel centered around Kubernetes. Before Codefresh, she worked in the blockchain space, contributing to Community Management and Developer Relations of open source projects. Her passion lies in making tools and projects more accessible to developers and community members.

Leave a Reply

* All fields are required. Your email address will not be published.