docker-registry-browser
docker-registry-browser copied to clipboard
support for deleting an image and all it's tags
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?
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