docker-registry-browser icon indicating copy to clipboard operation
docker-registry-browser copied to clipboard

support for deleting an image and all it's tags

Open dannydulai opened this issue 7 years ago • 1 comments

right now im using https://github.com/burnettk/delete-docker-registry-image to delete all tags of an image.

delete_docker_registry_image --image imagename

If you use docker-registry-browser to delete all tags of an image, it still leaves the image around with a page with no tags. I use the above to clean that up.

It'd be nice to have this functionality built in.

Is it possible or is this not available in the registry api?

dannydulai avatar May 09 '17 18:05 dannydulai

Hi @dannydulai,

unfortunately the registry API only supports to delete the tags and not the complete repository. AFAIK the official way is like you do and run a garbage-collection job on the registry server (there's on e build in) as a cronjob or so to remove repositories without tags.

I was initially thinking to check for the presence of tags and exclude the image from the list-view but this would have introduced some kind of N+1 query like behaviour on the API (one call to get all repositories and then another one per returned repository to check for it's tags) which I then decided to not to.

Best, Klaus

klausmeyer avatar May 10 '17 05:05 klausmeyer