Bug in Registry API/Registry

I may have discovered an issue that needs to be addressed related to the Open-Source Registry and its implementation of the Docker Registry API v2. I’m not sure where to post a bug report so I am trying a post here.

I am prepping to develop a basic open-source package primarily to list and remove tags and images. It’ll be tool for use when a repository admin wants remove images and tags from the repository. I ran into an issue while prototyping my intended HTTP conversations in Postman.

In this case I pulled hello-world:latest, created a few tags and pushed them to my sandbox registry. Using the API, I deleted an image using an HTTP DELETE while referencing the image’s Docker-Content-Digest. The delete ran successfully but the repository is still listed in _catalog. There are no tags or blobs associated with it. This seemed to me like the HTTP DELETE action logically corrupted the registry datastore by failing to delete all the image’s metadata.

So, I decided to see what would happen by issuing a command a developer might issue if they didn’t know the image has been deleted:

docker pull http://myhost.net/hello-world-old:latest

It returned this message:

   `Error response from daemon: manifest for myhost.net/hello-world-old:latest not found: 
     manifest unknown: manifest unknown` 

This message indicates a corrupt registry datastore because the response should be NOT FOUND.

A utility like this API should never corrupt the database. In my opinion, remediating this should be a high priority.

We have tabled our use of the Open-Source Registry because it isn’t ready for us to rely on it for our devops pipelines. It’s disappointing because we will need three docker instances on three servers. With the registry, we would merely some containers to our cluster.

So, my question is “Where should I report this issue so the developers can review?”

Before anyone asks, I tried triggering garbage collection. It made no difference. In any event, you should be able to push an image, delete it and get a 404 trying to pull it in sequence without waiting for garbage collection.

UPDATED with link to bug report on GitHub:
Bug in Registry API/Registry DELETE corrupts data store · Issue #140 · docker/distribution-library-image (github.com)

Thank you for the detailed post.

The link embedded in the Dockerhub description of the image should be fine:

Thank you for the link. The issue is posted here Bug in Registry API/Registry DELETE corrupts data store · Issue #140 · docker/distribution-library-image (github.com)

2 Likes