docker/cli · error

--quiet is not yet supported with --tree

Error message

--quiet is not yet supported with --tree

What it means

shouldUseTree() validates flag combinations before entering the experimental `--tree` renderer of `docker images`. The tree view does not yet implement --quiet, so passing both returns this error. It is the first of four sequential incompatibility checks.

Solutions

  1. Drop --quiet/-q when using --tree
  2. Drop --tree if you need IDs-only output
  3. Conditionally apply flags rather than always combining them

Example fix

// before
docker images --tree --quiet
// after
docker images --tree
Defensive patterns

Strategy: validation

Validate before calling

if options.tree && options.quiet {
    return errors.New("--quiet is not supported with --tree")
}

Prevention

When it happens

Trigger: `docker images --tree --quiet` (or `-q`).

Common situations: A shell alias or CI script that always adds `-q` combined with someone exploring the new `--tree` view.

Related errors


AI-assisted analysis of docker/cli@4f84911bfe (2026-08-07). Data as JSON: /api/errors/280cdb2e0c3f2d44. Report an issue: GitHub.

Appendix: 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 4f84911bfe)