How to Migrate DigitalOcean Container Registry to Vultr Container Registry

Updated on 06 May, 2025
Guide
How to Migrate DigitalOcean Container Registry to Vultr Container Registry header image

The Vultr Container Registry (VCR) is a managed container image repository that supports the Open Container Initiative (OCI) format. It provides a secure and scalable platform for storing and distributing container images across global infrastructure. Compared to DigitalOcean Container Registry (DOCR), VCR offers enhanced performance, competitive pricing, and improved integration with Kubernetes environments.

In this guide, you will migrate container images from DigitalOcean to the Vultr Container Registry. You will use both Docker and skopeo to perform single-image and bulk transfers between registries. The process includes authentication, tagging, pushing, and verifying your migrated images.

Prerequisites

Before you begin:

Prepare the Source DigitalOcean Container Registry

Follow the steps below to authenticate with DigitalOcean, list available images in your container registry, and prepare for migration.

  1. Log in to your migration workstation via SSH.

  2. Install the DigitalOcean CLI (doctl):

    console
    $ sudo snap install doctl
    
  3. Authenticate doctl using your API token:

    console
    $ doctl auth init
    

    Generate your API token from the DigitalOcean dashboard and paste it when prompted.

  4. Allow doctl to interact with Docker (required if installed via Snap):

    console
    $ sudo snap connect doctl:dot-docker
    
  5. Log in to your DigitalOcean Container Registry.

    console
    $ doctl registry login
    
  6. List all repositories and images available in your registry.

    console
    $ doctl registry repository list
    
  7. Identify the images you want to migrate and note their names and tags.

Set Up the Vultr Container Registry

Before migrating, ensure your Vultr Container Registry is set up with push access.

  1. Log in to the Vultr Customer Portal.
  2. Navigate to Products > Container Registry, and open your registry dashboard.
  3. Ensure that:
    • Push access is enabled under the Docker / Kubernetes tab
    • You’ve retrieved the registry URL, username, and API key

For a full walkthrough of VCR configuration, refer to the Vultr Container Registry Product Documentation.

Single Image Migration

This section shows how to migrate one container image from DigitalOcean Container Registry to Vultr Container Registry using Docker commands.

  1. Pull an image (for example, ubuntu) from your DigitalOcean registry. Replace <your-docr> with your actual registry name:

    console
    $ docker pull registry.digitalocean.com/<your-docr>/ubuntu:latest
    

    This command downloads the ubuntu image from the DigitalOcean registry to your migration workstation.

  2. Verify that the image exists locally.

    console
    $ docker images
    
  3. Tag the image for the Vultr registry.

    console
    $ docker tag registry.digitalocean.com/<your-docr>/ubuntu:latest \
    <your-vcr>/ubuntu:latest
    

    Replace <your-vcr> with your actual Vultr registry URL.

  4. Verify that the new tag was applied.

    console
    $ docker images
    

    Output.

    REPOSITORY                                            TAG       IMAGE ID       CREATED       SIZE
    <your-vcr>/ubuntu                                     latest    a04dc4851cbc   2 weeks ago   78.1MB
    registry.digitalocean.com/<your-docr>/ubuntu          latest    a04dc4851cbc   2 weeks ago   78.1MB 
  5. Log in to Vultr Container Registry.

    console
    $ docker login https://<your-vcr> -u <vcr-username> -p <vcr-api-key>
    
  6. Push the image to the Vultr registry.

    console
    $ docker push <your-vcr>/ubuntu:latest
    
  7. Remove the local copy to save disk space (optional).

    console
    $ docker rmi <your-vcr>/ubuntu:latest
    
  8. Pull the image from Vultr to verify it's available.

    console
    $ docker pull <your-vcr>/ubuntu:latest
    
  9. Run the container to verify the image works.

    console
    $ docker run -dit --name ubuntu-test <your-vcr>/ubuntu:latest
    

    Verify the running container:

    console
    $ docker ps
    

    Output.

    CONTAINER ID   IMAGE                          STATUS         NAMES
    abcd12345678   <your-vcr>/ubuntu:latest       Up 5 seconds   ubuntu-test

    This confirms that the image was successfully migrated and runs correctly from the Vultr Container Registry.

Bulk Migration

Automate multi-image migrations by fetching image names from DigitalOcean Container Registry using doctl and looping through them in a Bash script. This approach reduces manual effort when transferring multiple repositories.

  1. Log in to your Vultr Container Registry.

    console
    $ docker login https://<your-vcr> -u <vcr-username> -p <vcr-api-key>
    

    Replace <your-vcr> and <credentials> with your actual registry URL and credentials.

  2. Create a migration shell script to automate the migration process.

    console
    $ nano migration.sh
    
  3. Add the following content to the script.

    bash
    #!/bin/bash
    
    DOCR="registry.digitalocean.com/<your-docr>"
    VCR="<your-vcr>"
    
    # Fetch repository names from DOCR. Assumes you are authenticated via `doctl`.
    IMAGES=($(doctl registry repository list | awk 'NR > 1 {print $1}'))
    
    if [ ${#IMAGES[@]} -eq 0 ]; then
        echo "No images found in DigitalOcean registry."
        exit 1
    fi
    
    echo "Found the following images to process:"
    printf "%s\n" "${IMAGES[@]}"
    echo "-------------------------------------"
    
    for IMAGE in "${IMAGES[@]}"
    do
        FULL_IMAGE_NAME="${IMAGE}:latest"
        echo "Processing image: $FULL_IMAGE_NAME"
    
        # Pull image from DigitalOcean
        docker pull $DOCR/$FULL_IMAGE_NAME
    
        # Tag image for Vultr
        docker tag $DOCR/$FULL_IMAGE_NAME $VCR/$FULL_IMAGE_NAME
    
        # Push image to Vultr
        docker push $VCR/$FULL_IMAGE_NAME
    
        echo "Successfully migrated: $FULL_IMAGE_NAME"
        echo "-------------------------------------"
    done
    
    echo "Image migration completed for:"
    printf "%s\n" "${IMAGES[@]}"
    

    Replace <your-docr> and <your-vcr> with your actual DigitalOcean and Vultr registry names.

    This script retrieves all image names from your DigitalOcean Container Registry using doctl, then loops through each image to:

    • Pull it from DigitalOcean
    • Tag it for the Vultr Container Registry
    • Push it to Vultr
  4. Save and run the script.

    console
    $ bash migration.sh
    
  5. Verify that all images are available in your Vultr Container Registry.

    console
    $ docker images <your-vcr>/*
    

    Output:

    REPOSITORY                          TAG       IMAGE ID       CREATED        SIZE
    <your-vcr>/node                    latest    b1e1dcf10eb9   2 weeks ago    1.12GB
    <your-vcr>/php                     latest    cd0e124311ea   2 weeks ago    547MB
    <your-vcr>/nginx                   latest    53a18edff809   7 weeks ago    192MB
    <your-vcr>/python                  latest    e6c8fe2e1108   7 weeks ago    1.02GB
    <your-vcr>/ubuntu                  latest    a04dc4851cbc   2 months ago   78.1MB
    <your-vcr>/httpd                   latest    83d938198316   2 months ago   148MB

Use skopeo for Direct Registry Transfers

skopeo is an efficient alternative to Docker for registry-to-registry transfers. Use it when you want to avoid local disk usage or integrate into CI/CD pipelines.

Verify and Test the Vultr Container Registry Images

After migrating your images, verify their availability and functionality to ensure a successful transition.

  1. Pull the image from the Vultr Container Registry.

    console
    $ docker pull <your-vcr>/ubuntu:latest
    
  2. Run a container from the pulled image to verify it works.

    console
    $ docker run -dit --name ubuntu-test <your-vcr>/ubuntu:latest
    
  3. Verify that the container is running.

    console
    $ docker ps
    

    Output.

    CONTAINER ID   IMAGE                          STATUS         NAMES
    f5ebf8a3ca94   <your-vcr>/ubuntu:latest       Up 3 seconds   ubuntu-test

This confirms that the image was pushed successfully and runs as expected from the Vultr Container Registry.

Cutover to the Vultr Container Registry

After confirming that your images work on Vultr, update your Kubernetes, Docker Compose, and CI/CD configurations to use the new image paths.

  1. Update your Kubernetes manifests to use the Vultr Container Registry.

    yaml
    containers:
      - name: my-app
        image: <your-vcr>/example-image:latest
    
  2. Update your Docker Compose files.

    yaml
    services:
      app:
        image: <your-vcr>/example-image:latest
    
  3. Update your CI/CD pipelines (e.g., GitHub Actions, GitLab CI) to pull images from the new registry.

  4. Remove or deprecate the old DigitalOcean Container Registry if it's no longer needed.

  5. Monitor your application's performance and logs to ensure services operate normally.

  6. Periodically pull and run images from Vultr to validate that they remain functional and uncorrupted.

Conclusion

You've successfully migrated container images from the DigitalOcean Container Registry to the Vultr Container Registry using Docker or skopeo. Always test your images after migration and update your deployments accordingly. To learn more about managing your container images on Vultr, see the Vultr Container Registry Reference Guide.

Comments

No comments yet.