-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Always run untag when removing docker image #70647
Always run untag when removing docker image #70647
Conversation
aa84567
to
1d8e461
Compare
1d8e461
to
9e8df0f
Compare
/ok-to-test |
Is there some action required on my side for this to proceed? If this is the case, please let me known and I will take care of it. |
@sjenning is there something more required before this can be merged and backported? |
needs lgtm and approval. I can only lgtm. This makes sense to me. |
/assign @derekwaynecarr @yujuhong |
this makes sense to me as well. /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: corvus-ch, derekwaynecarr The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
||
for _, image := range images { | ||
if _, err := ds.client.RemoveImage(image, dockertypes.ImageRemoveOptions{PruneChildren: true}); err != nil && !libdocker.IsImageNotFoundError(err) { | ||
return nil, err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't it start returning image not found error after all tags are deleted?
@corvus-ch , which problem does it solve? comment suggests that repo digests are preventing image from being deleted, but in my testing digests do not create any references, tags do and deleting all tags is enough to delete image |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Under certain conditions a docker image can have one tag while
assiciated to multiple repositories. This prevents the image from being
removed due to the multi repository association. Always removing all
tags, prevents this from happening.
This can be reproduced with the following:
This ends with an image which has one image tag but multiple repo digests.
Which issue(s) this PR fixes
none
Special notes for your reviewer:
none
Does this PR introduce a user-facing change?: