I have a private Docker registry, v2.6.0, containing several tagged versions on an image:
foo/bar:1
foo/bar:1_keep (same image as 1)
foo/bar:2
foo/bar:3
foo/bar:latest (same image as 3)
I want to remove a single tag without necessarily removing the image. So if I remove tag 2, it's okay to remove the image because nothing else refers to it. But if I remove tag 1, only that tag should go, not the image.
That suggests an API request like this:
DELETE http://repo/v2/foo/bar/tags/1
But that gives me a 404. Instead I have to delete the manifest, which means doing all the work of checking that it isn't in use by another tag.
I looked at the source of https://github.com/fraunhoferfokus/deckschrubber and it doesn't appear to trouble itself with checking that it's safe to remove a manuscript. Am I missing something?
Is there a better way of doing this? If not, why not, and is it likely to be fixed?