-
Notifications
You must be signed in to change notification settings - Fork 2.6k
podman images --filter dangling=false showing dangling images #26019
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
Comments
Hi @heitorPB If you are referring to image id
Some other checks are done on an image so even one with no name could still not be considered "dangling" if the image has children or is used in a manifest list. For your reference below I have pasted the function we use to determine the "dangling" state. Please let me know if this satisfies your bug report or if I have misunderstood your report. // isDangling returns true if the image is dangling, that is an untagged image
// without children and not used in a manifest list. If tree is nil, it will created for this invocation only.
func (i *Image) isDangling(ctx context.Context, tree *layerTree) (bool, error) {
if len(i.Names()) > 0 {
return false, nil
}
children, err := i.getChildren(ctx, false, tree)
if err != nil {
return false, err
}
_, usedInManfiestList := tree.manifestListDigests[i.Digest()]
return (len(children) == 0 && !usedInManfiestList), nil
} |
A reviewer has determined we need more information to understand the reported issue. A comment on what is missing should be provided. Be certain you:
If no response to the For more information on reporting issues on this repository, consult our issue guide. |
Thanks for the quick reply @ninja-quokka! My concept of dandling was not correct then. Any ideas how I could get an image without a tag? |
Just build a new image with the same tag, then the original image with be untagged. |
No worries mate, Yeah it's a little complex. You can end up with images that have names and no tag when doing things like mulistage builds, it's not uncommon and if unused, can be cleaned up with a prune. |
podman untag is the simplest |
Issue Description
`podman image ls --filter "dangling=false" lists dangling image.
Steps to reproduce the issue
Steps to reproduce the issue:
Describe the results you received
The filter
dangling=false
has no effect and shows images with<none>
tag.Describe the results you expected
I'd expect no image with
<none>
tag.podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
No
Additional environment details
Linux NixOS unstable channel.
Additional information
No response
The text was updated successfully, but these errors were encountered: