docker/cli ยท error

--no-trunc is not yet supported with --tree

Error message

--no-trunc is not yet supported with --tree

What it means

The --tree view of `docker image ls` controls its own truncation and layout, so --no-trunc (which requests full untruncated IDs/digests in the tabular view) is not implemented for it. shouldUseTree rejects the combination explicitly with a 'not yet supported' error instead of producing misleading output.

Source

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

		},
		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")
		}
		return false, nil
	}
	return true, nil
}

View on GitHub (pinned to e9452d6e78)

Solutions

  1. Use the classic view for full IDs: `docker image ls --no-trunc`.
  2. Use `docker image ls --tree` without --no-trunc and accept truncated display, or get full digests via `docker image inspect <image> --format '{{index .RepoDigests 0}}'`.
  3. Upgrade the CLI when the combination gains support.

Example fix

# before
docker image ls --tree --no-trunc
# after
docker image ls --no-trunc

When it happens

Trigger: Running `docker image ls --tree --no-trunc` (or `docker images --tree --no-trunc`); shouldUseTree returns the error whenever both options.noTrunc and options.tree are set.

Common situations: Users wanting full sha256 digests from the tree view; scripts that always pass --no-trunc for parseable output being pointed at the tree mode; aliases adding --tree to a command family where --no-trunc was habitual.

Related errors


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