-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Deleting tags without deleting the image #2317
Comments
when delete via |
@Oleksii-Terekhov : Could you or someone else elaborate on that please? let's say you push two tags for the same image:
If you next try to get the digest for those two tags, you will get the exact same value in the GET GET So, how do you get a digest which points only to the tag, not the image ? |
in short - digest - string like "sha256:3f6952b193ece0b3b3f63e3d888f5a572fa095723a11535e08c42ecc50733435" we use python, look on get_tag_digest():
` |
It looks to me like you are doing the exact same thing as me. And I can assure you, that does not only delete the tag. It deletes the image and all it's associated tags |
yes... but tag disk cost - zero... if you plan kill all old/unused/unwanted images - you MUST:
|
Not correct I am afraid. I think you miss the point that it removes the image and all it's associated tags.
So my conclusion is that this issue report is indeed valid |
#1811 is pretty related and describes the root of this issue. My company is running into this as well. I believe that two tags will only have the same digest if they have the same content. If, for whatever reason, you push the same image content twice but with a different tag each time (as @vidarl mentioned in comment 3), they will have the same digest. The API does not support deleting just one of those tags. It will delete both. |
besides the issue, i have a similar one for registry 2.6.2 with storage delete enabled, namely when to delete an image with curl -X DELETE --cacert .. https://***/v2/test-debian/manifests/digest , actions can not be executed successfully with {"errors":[{"code":"MANIFEST_UNKNOWN","message":"manifest unknown"}]} |
Currently the only API call for deleting is to delete the entire image manifest, which results in all tags also being deleted. There been discussion on improving the tag APIs in OCI distribution-spec. Until something like that makes it into the spec and then implemented in registries, I'm hacking around this in regclient by pushing a temporary unique manifest to the tag and then delete that unique manifest. |
This is not implemented in 2.8.1, but implementation is merged in main. #3427 |
Hello, in my company we have a private registry (v2) and we use tags to determine the latest version of running applications. Thus it's possible for an image to have several tags. Is it possible through the API to untag an image without deleting the underlying image. I've searched the API and so far all I found is:
DELETE /v2//manifests/
Which deletes the image and all tags associated with it, while in many cases I just want to remove one tag.
If an API endpoint isn't available can it be added.
thanks
The text was updated successfully, but these errors were encountered: