docker/cli · error
--show-digest is not yet supported with --tree
Error message
--show-digest is not yet supported with --tree
What it means
Third check in shouldUseTree(): the `--tree` view does not yet render the digests column, so `--show-digest` (the `--digests` flag) is incompatible and rejected.
Solutions
- Drop --digests when using --tree
- Use the tabular view (`--tree` off) to see digests
- Run two separate invocations for tree vs digest output
Example fix
// before docker images --tree --digests // after docker images --digests
Defensive patterns
Strategy: validation
Validate before calling
if options.tree && options.showDigests {
return errors.New("--show-digest is not supported with --tree")
} Prevention
- Do not combine --tree with --digests
- Run a separate `docker images --digests` when digest data is needed
- Audit scripts that always request digests before enabling --tree
When it happens
Trigger: `docker images --tree --digests`.
Common situations: Auditing/inspection scripts that always request digests combined with the tree view.
Related errors
- --quiet is not yet supported with --tree
- --no-trunc is not yet supported with --tree
- --format is not yet supported with --tree
- requested load from stdin, but stdin is empty
- image prune has been cancelled
AI-assisted analysis of docker/cli@4f84911bfe (2026-08-07).
Data as JSON: /api/errors/8fec5716e68e2978.
Report an issue: GitHub.
Appendix: source
Thrown at cli/command/image/list.go:164
return len(images), nil
}
func shouldUseTree(options imagesOptions) (bool, error) {
if options.quiet {
if options.tree {
return false, errors.New("--quiet is not yet supported with --tree")
}
return false, nil
}
if options.noTrunc {
if options.tree {
return false, errors.New("--no-trunc is not yet supported with --tree")
}
return false, nil
}
if options.showDigests {
if options.tree {
return false, errors.New("--show-digest is not yet supported with --tree")
}
return false, nil
}
if options.format != "" {
if options.tree {
return false, errors.New("--format is not yet supported with --tree")
}
return false, nil
}
return true, nil
}
// isDangling is a copy of [formatter.isDangling].
func isDangling(img image.Summary) bool {
if len(img.RepoTags) == 0 {
return true
}
return len(img.RepoTags) == 1 && img.RepoTags[0] == "<none>:<none>" && len(img.RepoDigests) == 1 && img.RepoDigests[0] == "<none>@<none>"View on GitHub (pinned to 4f84911bfe)