A common problem to delete an image on your private registry (self-hosted).

Nipe Setiawan Harefa
1 min readApr 19, 2021
https://unsplash.com/photos/XsP7GCLMWjM

A couple of days ago, I have trying to deploy my own private registry on my server. I can log in, push and pull docker image to the registry and that looks good.

But I have a problem when I want to delete some tag on the image. According to API documentation, you must know what digest image/tag you want to be deleted. For example, I have an image nipe/test:v1.0 and the is sha:shanumber .

And call the delete endpoint and you got the response from the server like this:

Yap, after check all my requests and validate the digest, and trying to call delete again, and I got the same results. At the weekend I have spent my time resolving this error and I have concluded to resolve the error.

  • Make sure your private docker config is able to delete the docker image. You can check in docker-compose env, you must enable the REGISTRY_STORAGE_DELETE_ENABLED
  • When request detail manifests info or delete. make sure your request headers using application/vnd.docker.distribution.manifest.v2+json.

--

--