New Tool to Migrate From V1 Registry to Docker Trusted Registry or V2 Open Source Registry

Harder, Better, Faster, Stronger

The distribution and management of Docker images are made possible by various registry services including: Docker Hub, Docker Trusted Registry and Docker Open Source Registry.

Both Docker Hub and Docker Trusted Registry are commercial products that incorporate the open source registry capabilities into their respective solutions. Docker Hub is a multi-tenant service hosted by Docker while Docker Trusted Registry and open source Registry provide users with the option to host private registries behind their own firewall or dedicated cloud environment.

In April of 2015, we released Docker Registry 2.0 which included a complete rewrite in Go and the new Docker Registry HTTP API v2. Upon release, Docker Registry 2.0 was put into production on Docker Hub for users of the Docker Engine 1.6 or greater making the integration of the quicker, more reliable registry was transparent to its users.

And at DockerCon 2015, we announced Docker Trusted Registry which is a dedicated registry solution incorporating the open source Docker Registry 2.0 functionality.

registry2

Making the Switch

For users of a self-hosted Docker registry, simply swapping out a v1 registry for a v2 while maintaining the catalog of Docker images is not possible due to differences in the v1 and v2 specifications and how data is stored. With the v2 registry came a new data storage model focused on security and reliability. We either needed to start over with an empty v2 registry or figure out a way to migrate our data. To migrate our images from a v1 registry, the contents must be processed and migrated in order to be stored in the new format.

Since the release of Docker Engine 1.6, the engine itself has been aware of how to push and pull images from both v1 and v2 registries. The v1 registry allows us to search the registry for all images and tags resulting in a catalog of all Docker images stored.

When you bring together the catalog of images in a v1 registry and the Docker Engine 1.6 or greater, we have just about have all of the ingredients that we need to migrate our Docker images. After drafting the requirements of how to perform a v1 to v2 migration with our pre-existing tools, we created a Migrator tool that brought all the pieces together.

This allows us to migrate an existing self-hosted v1 registry to a v2 registry implementation – no matter if it is Docker Trusted Registry or your own v2 based registry. Please report problems or feedback through GitHub Issues and as always, pull requests are welcome.

 

Additional Resources

Migrator on GitHub
Migrator on Docker Hub
Docker Registry (v1)
Docker Registry V2 Distribution (v2)
Docker Trusted Registry


 

 Learn More about Docker

 

, , , , ,

New Tool to Migrate From V1 Registry to Docker Trusted Registry or V2 Open Source Registry


Leave a Reply

Get the Latest Docker News by Email

Docker Weekly is a newsletter with the latest content on Docker and the agenda for the upcoming weeks.