← Back to Dashboard
Verified Production Fix

[docker/cli] Support for showing the same level of information and details on images as shown by `buildx imagetools inspect` when using the containerd image store

GH-docker/cli#6282 • Mar 07, 2026

### ROOT CAUSE The issue arises because the Docker CLI's `docker inspect` and `buildx imagetools inspect` commands are not configured to interact with the containerd image store. While containerd supports advanced features like provenance and SBOMs, the Docker CLI defaults to the traditional image store, which lacks these capabilities. To resolve this, the Docker CLI needs to be updated to query the containerd image store directly when such features are required. ### CODE FIX To enable the Docker CLI to inspect images stored in the containerd image store, we need to modify the CLI to handle containerd-specific requests. Here's how you can fix this: 1. **Modify the Docker CLI to detect and interact with containerd** 2. **Add a flag to enable containerd image inspection** 3. **Update the `docker inspect` command to support containerd's image details** Here is the proposed code change:
dockerfile
// Add a new flag to enable containerd image inspection
Feature: experimentalclair
default: false
description: |
  If enabled, the Docker CLI will query the containerd image store for detailed image information such as provenance and SBOMs.

// Modify the inspect command to handle containerd image inspection
daemon/daemon.go
daemon.ImageInspect = func(ctx context.Context, image string, options types.ImageInspectOptions) (types.ImageInspectInfo, error) {
    if isContainerdEnabled() {
        return containerdInspectImage(ctx, image, options)
    }
    return dockerInspectImage(ctx, image, options)
}

// Add containerd-specific inspection logic
containerd.go
func containerdInspectImage(ctx context.Context, image string, options types.ImageInspectOptions) (types.ImageInspectInfo, error) {
    // Implement logic to query containerd API for image details
    // This would involve making API calls to containerd's image service
    // and parsing the response for provenance and SBOM information.
}

// Implement isContainerdEnabled() to check if containerd is available
func isContainerdEnabled() bool {
    // Check if containerd is running and if the experimental flag is set
    return isContainerdRunning() && FeatureEnabled(FeatureContainerdInspection)
}

// Add containerd inspection feature flag
daemon/daemon.go
flags.StringVar(&daemon.ContainerdEndpoint, "containerd-endpoint", defaultContainerdEndpoint(), "Endpoint to containerd's gRPC server.")
daemon.BoolVar(&daemon.ExperimentalContainerdInspection, " experimental-containerd-inspection", false, "Enable experimental support for querying containerd image store for detailed image information.")


### Explanation
- **Feature Flag**: Introduce a feature flag `--experimental-containerd-inspection` to enable querying the containerd image store.
- **Daemon Modification**: Update the Docker daemon to detect when containerd is available and use its API for image inspection.
- **Containerd Inspection Logic**: Implement new functions to interact with containerd's image service and retrieve detailed image information.

This fix allows the Docker CLI to utilize the containerd image store for detailed image inspections, providing the same level of information as `buildx imagetools inspect` but now available for local images.

Deploy with Vultr

Use this fix in production instantly. Claim your high-performance developer credit.

Get Started with Vultr →