diff --git a/cli/command/formatter/image.go b/cli/command/formatter/image.go index 89553d1048..a84bd08e41 100644 --- a/cli/command/formatter/image.go +++ b/cli/command/formatter/image.go @@ -27,6 +27,9 @@ type ImageContext struct { } func isDangling(image types.ImageSummary) bool { + if len(image.RepoTags) == 0 && len(image.RepoDigests) == 0 { + return true + } return len(image.RepoTags) == 1 && image.RepoTags[0] == ":" && len(image.RepoDigests) == 1 && image.RepoDigests[0] == "@" }