Skip to content

Commit 881c353

Browse files
authored
Merge pull request #4046 from vvoland/dangling-images-none
formatter: Consider empty RepoTags and RepoDigests as dangling
2 parents b244ad6 + 89687d5 commit 881c353

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

cli/command/formatter/image.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ type ImageContext struct {
2727
}
2828

2929
func isDangling(image types.ImageSummary) bool {
30+
if len(image.RepoTags) == 0 && len(image.RepoDigests) == 0 {
31+
return true
32+
}
3033
return len(image.RepoTags) == 1 && image.RepoTags[0] == "<none>:<none>" && len(image.RepoDigests) == 1 && image.RepoDigests[0] == "<none>@<none>"
3134
}
3235

0 commit comments

Comments
 (0)