Inspect and provide detailed breakdown of a container image
Inspect container image metadata, layers, and multi-arch support using skopeo. Use this to analyze image composition, verify architecture compatibility, check sizes, and troubleshoot deployment issues before pulling.
/plugin marketplace add openshift-eng/ai-helpers/plugin install origin@ai-helpers<image>container-image:inspect
/container-image:inspect <image>
The container-image:inspect command provides a comprehensive breakdown of a container image using skopeo and podman. It analyzes the image metadata, configuration, and layers to give you detailed information about the image structure, size, architecture, and contents.
This command is useful for:
The command works with images from any registry (quay.io, docker.io, registry.redhat.io, etc.) and automatically detects whether an image is a manifest list (multi-architecture) or a single image, providing detailed analysis for both cases.
Required Tools:
skopeo - For image inspection without pulling
which skopeosudo dnf install skopeosudo apt-get install skopeobrew install skopeopodman (Optional) - For additional image analysis
which podmansudo dnf install podmansudo apt-get install podmanbrew install podmanRegistry Authentication:
For private registries, ensure you're authenticated:
# Using skopeo
skopeo login registry.example.com
# Using podman
podman login registry.example.com
The command performs the following analysis steps:
Check Tool Availability:
skopeo is installedpodman (optional but recommended)Inspect Image Metadata with skopeo:
skopeo inspect docker://<image>
This provides:
Determine Image Type:
skopeo inspect --raw docker://<image>
schemaVersion and mediaType to identify:
application/vnd.oci.image.index.v1+jsonapplication/vnd.docker.distribution.manifest.list.v2+jsonapplication/vnd.oci.image.manifest.v1+jsonapplication/vnd.docker.distribution.manifest.v2+jsonExtract Manifest List Details (if applicable):
skopeo inspect docker://<image>@<platform-digest>
Analyze Image Layers:
Extract Configuration Details:
Infer Image Purpose:
io.openshift.*, io.k8s.*, org.opencontainers.*)Present Organized Summary:
The command outputs a structured breakdown of the image:
================================================================================
CONTAINER IMAGE INSPECTION
================================================================================
Image: quay.io/openshift-release-dev/ocp-release:4.20.0-multi
IMAGE PURPOSE:
This is an OpenShift release image containing the cluster-version-operator
for OpenShift 4.20.0. It's part of the OpenShift release payload used to
manage cluster upgrades and version management.
BASIC INFORMATION:
Manifest Digest: sha256:4f1e772349a20f2eb69e8cf70d73b4fcc299c15cb6e4f027696eb469e66d4080
Type: Manifest List (Multi-Architecture)
Manifest Type: Docker Distribution Manifest List v2
Created: 2025-10-16T13:35:26Z
MANIFEST LIST DETAILS:
This is a multi-architecture manifest list containing 4 platform variants.
AVAILABLE PLATFORMS (4):
--------------------------------------------------------------------------------
1. linux/amd64
Digest: sha256:b4bd68afe0fb47bf9876f51e33d88e9dd218fed2dcf41b025740591746dda5c9
Size: 167.6 MB (175,762,648 bytes)
Layers: 6
Created: 2025-10-16T13:35:26Z
2. linux/arm64
Digest: sha256:eec6b0e6ff1c4cf5edc158c41a171ac8b02d7e0389715b663528a4ec0931b1f2
Size: 161.6 MB (169,501,175 bytes)
Layers: 6
Created: 2025-10-16T13:35:26Z
3. linux/ppc64le
Digest: sha256:4bb9eb125d4d35c100699617ec8278691a9cee771ebacb113173b75f0707df56
Size: 174.4 MB (182,863,818 bytes)
Layers: 6
Created: 2025-10-16T13:35:26Z
4. linux/s390x
Digest: sha256:5e852c796f2d3b83b3bd4506973a455a521b6933e3944740b32c1ed483b2174e
Size: 163.2 MB (171,055,271 bytes)
Layers: 6
Created: 2025-10-16T13:35:26Z
PLATFORM COMPARISON:
Size Range: 161.6 MB - 174.4 MB (arm64 smallest, ppc64le largest)
Size Variance: ~12.8 MB difference between smallest and largest
Architectures: 4 platforms (amd64, arm64, ppc64le, s390x)
OS: linux (all)
Layer Count: 6 (all platforms)
Build Time: All platforms built simultaneously
USAGE:
To pull a specific platform:
podman pull --platform=linux/amd64 quay.io/openshift-release-dev/ocp-release:4.20.0-multi
podman pull quay.io/openshift-release-dev/ocp-release@sha256:b4bd68afe0fb... # amd64
CONFIGURATION (amd64 example):
User: <default>
WorkingDir: <default>
Entrypoint: ["/usr/bin/cluster-version-operator"]
Cmd: <none>
Env:
- PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- BUILD_VERSION=v4.20.0
- OS_GIT_VERSION=4.20.0-202509230726.p2.g9de00ba.assembly.stream.el9-9de00ba
EXPOSED PORTS:
<none>
LABELS:
io.openshift.release: 4.20.0
io.openshift.release.base-image-digest: sha256:6f58f521f51ae43617d2dead1efbe9690b605d646565892bb0f8c6030a742ba7
VOLUMES:
<none>
LAYER DETAILS (amd64):
Total Layers: 6
Total Size: 167.6 MB (compressed)
================================================================================
Inspect a public image:
/container-image:inspect quay.io/openshift-release-dev/ocp-release:4.17.0-x86_64
Provides full breakdown of the OpenShift release image.
Inspect a manifest list:
/container-image:inspect registry.redhat.io/ubi9/ubi:latest
Shows available architectures and platform-specific details.
Inspect with specific tag:
/container-image:inspect docker.io/library/nginx:1.25
Analyzes the nginx image with tag 1.25.
Inspect by digest:
/container-image:inspect quay.io/prometheus/prometheus@sha256:abc123...
Inspects a specific image version by its digest.
Inspect a private registry image:
/container-image:inspect registry.example.com/myorg/myapp:v1.0.0
Analyzes an image from a private registry (requires authentication).
Image not found: If the image doesn't exist or the name is incorrect:
Tool not available: If skopeo is not installed:
podman inspect as an alternative (if podman is available)Authentication errors: If registry requires authentication:
skopeo login <registry> or podman login <registry>Network errors: If registry is unreachable:
skopeo inspect fetches metadata without downloading the entire image[registry/]repository[:tag|@digest]quay.io/openshift/origin-node:latestdocker.io/library/alpine:3.18registry.redhat.io/ubi9/ubi@sha256:abc123...