-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reg rm
deletes more than just the specified tag
#203
Comments
I ran into this as well and am curious what the expected behavior is and how I would go about deleting just the tag I supply. Using v0.16.1. |
@patricklucas Did you find any alternatives to remove a tag without it removing other tags? |
@rskuipers unfortunately not, I just re-pushed the image to the erroneously-deleted tag. |
Hi, Today I started to use this tool and get the same issue. I use this to remove the oldest tags from my private container registry automatically. I have the following list of tags:
the command executed is:
And the result was that the tags dev0.0.3 and dev0.0.4 was deleted. It would be great to know what is the behavior of the Regards, |
This is because the Note that currently, there is no atomic operation to delete a single tag through the docker registry API. It should be possible to push an empty manifest to a specific repository moving the to-be-removed tag to it and then removing the empty manifest though. [1] https://docs.docker.com/registry/spec/api/#deleting-an-image |
I was surprised by the behavior of
reg rm
in that it removes other tags that point to the same image digest as well as the specified tag.The real-world example where I noticed the issue (I'm running the open source registry) is that I was removing the
latest
tag from a repo, but the result was an additional tag being removed as well, but not all the tags pointing to the same digest.I've annotated the unique true images with the letters
A/B/C/D
.When I ran
$ reg rm my-registry/flink:latest
, the twoA
tagslatest
and1.10.0-stream1-scala_2.12
were removed, but the otherA
tags remained. I expected that only thelatest
tag should go away.A more contrived example is this:
I.e. all five tags are gone after the single delete.
It's possible this is a behavior of the registry itself, though I don't remember running into this when using some custom scripts with curl to delete tags manually.
I'm able to reproduce the "partial deletion" if I push the
scala_2.12
tag again aslatest
, then again deletelatest
. Here is the output, along with verification that theA
image digests are indeed the same, and using debugging logging on the call toreg rm
:(
1.10.0-stream1-scala_2.12
is missing, along withlatest
)What is the exact intended behavior for
reg rm
? Do you think this is a problem with the registry?The text was updated successfully, but these errors were encountered: