Switching Container Registries With Zero Downtime


March 16, 2023

This article was originally posted on


You can change the hosting provider of your packages, containers, and files without impacting the end user with Scarf.

Scarf Gateway (available under the Apache 2 license at https://github.com/scarf-sh/gateway ) and our managed Scarf service are designed to provide you with an easy way to change out the back-end container registry, package location, or file hosting platform for your open source software. Scarf Gateway does this by creating a custom domain redirect to the channels distributing your software.  If you find a provider not meeting your needs, simply update the endpoint, and all your users will continue using the same commands and destinations they used previously with no noticeable change.   

Scarf Gateway

How Scarf Gateway works is similar to a link shortener like bit.ly, which acts as a domain gateway to redirect traffic.  Where it is different from a normal link shortener is it is designed to be compatible with the different API’s used by various services like:

  • Registries like Docker Hub, Google Container Registry, RedHat Quay, Amazon Elastic Container Registry, and Azure Container Registry 
  • Package managers like Nix, homebrew, RPM, Apt, etc,
  • Language specific package managers like pip or npm, 
  • Files coming via source control repos (Github or Gitlab) 
  • Or any file that is a direct download on the internet

One Line Change:

If you are using the open source version of the Scarf Gateway, changing container registries is literally a one-line change

Sending traffic through testorg.docker.scarf.sh -> ECR
Sending traffic through testorg.docker.scarf.sh -> Docker Hub

Update the registry variable in the configuration, and all your user's pull commands will redirect to the new location.  No fuss.

If you are using Scarf.sh’s managed service the UI is just as simple (note using our hosted managed service is free if you don’t want to run the gateway on your own):

See how Scarf enables you to see more about your downloads:

You can see an example setup using the UI here (~3 minutes):  

Latest blog posts

Tools and strategies modern teams need to help their companies grow.

The Most Neglected and Overlooked Open Source Metric: Production Users

The Most Neglected and Overlooked Open Source Metric: Production Users

Everyone wants a larger open source user base, but very few people effectively measure its growth. Let’s discuss why.
Switching Container Registries With Zero Downtime

Switching Container Registries With Zero Downtime

You can use the open source Scarf Gateway to switch hosting providers, container registries, or repositories without impacting end users in the future.
Understanding Tech Layoffs and the Economy’s Impact on Open Source

Understanding Tech Layoffs and the Economy’s Impact on Open Source

What is driving all this tech layoffs? , What is their impact on the open source software industry? We will walk through all the potential reasons from an economic downturn, herd mentality, excessive borrowing and spending due to low interest rates, and growth at all costs as the main reasons behind the layoffs. Companies can continue to grow in this tight economic market if they are focused on optimizing efficiency and sustaining the right growth.