docker/cli ยท error

--quiet is not yet supported with --tree

Error message

--quiet is not yet supported with --tree

What it means

`docker image ls --tree` renders a multi-platform tree view whose output layout is incompatible with --quiet (which prints only image IDs, one per line). shouldUseTree in list.go explicitly rejects the flag combination rather than silently ignoring one flag; the tree view is a newer feature and quiet output for it has not been implemented ('not yet supported').

Source

Thrown at cli/command/image/list.go:152

	imageCtx := formatter.ImageContext{
		Context: formatter.Context{
			Output: dockerCLI.Out(),
			Format: formatter.NewImageFormat(format, options.quiet, options.showDigests),
			Trunc:  !options.noTrunc,
		},
		Digest: options.showDigests,
	}
	if err := formatter.ImageWrite(imageCtx, images); err != nil {
		return 0, err
	}
	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")

View on GitHub (pinned to e9452d6e78)

Solutions

  1. Drop --tree when you need IDs: `docker image ls -q`.
  2. Drop -q/--quiet when you want the tree view: `docker image ls --tree`.
  3. Remove --tree from aliases/wrappers used by scripts, or upgrade the docker CLI later once the combination is supported.

Example fix

# before
docker image ls --tree -q
# after
docker image ls -q

When it happens

Trigger: Running `docker image ls --tree --quiet` (or `docker images --tree -q`). shouldUseTree returns this error whenever options.quiet and options.tree are both set.

Common situations: Scripts using `-q` to feed image IDs into xargs/rm while a user alias adds --tree by default; users exploring the new tree view and combining it with familiar flags; shell aliases like `alias di='docker images --tree'` breaking existing `di -q` usage.

Related errors


AI-assisted analysis of docker/cli@e9452d6e78 (2026-08-01). Data as JSON: /data/errors/280cdb2e0c3f2d44.json. Report an issue: GitHub.