image/list: Respect dangling filter when not using --all
Otherwise `docker images --filter dangling=true` won't work without `--all`. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
@@ -116,7 +116,9 @@ func runImages(ctx context.Context, dockerCLI command.Cli, options imagesOptions
|
||||
}
|
||||
images := res.Items
|
||||
if !options.all {
|
||||
images = slices.DeleteFunc(images, isDangling)
|
||||
if _, ok := filters["dangling"]; ok {
|
||||
images = slices.DeleteFunc(images, isDangling)
|
||||
}
|
||||
}
|
||||
|
||||
if options.tree {
|
||||
|
||||
Reference in New Issue
Block a user