Inspect a remote container image without pulling it, using crane and skopeo (digest, manifest, config, tags, multi-arch platform, auth)

domain: github.com/google/go-containerregistry · 10 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Get the digest of an image without pulling: crane digest IMAGE (flags: --full-ref to print the full reference by digest; inherited --platform os/arch[/variant] which defaults to 'all', --insecure, -v).
  2. Get the raw manifest JSON: crane manifest IMAGE — on a multi-arch image without --platform this returns the top-level index/manifest list; pass --platform linux/amd64 (etc.) for a single architecture's manifest.
  3. Get the image config JSON (Env, Entrypoint/Cmd, Labels, WorkingDir, etc.): crane config IMAGE
  4. List the tags in a repo: crane ls REPO (flags: --full-ref; -O/--omit-digest-tags to omit digest tags like ':sha256-...').
  5. Auth for crane: crane auth login REGISTRY -u USER -p PASS (or --password-stdin); by default crane uses go-containerregistry's authn.DefaultKeychain, which reads ~/.docker/config.json (or $DOCKER_CONFIG) as populated by docker login, falling back to Podman's ${XDG_RUNTIME_DIR}/containers/auth.json.
  6. Inspect with skopeo without pulling: skopeo inspect docker://IMAGE — default JSON includes Name, Digest, RepoTags, Created, DockerVersion, Labels, Architecture, Os, Layers, LayersData, Env.
  7. Variants: skopeo inspect --config docker://IMAGE outputs the image configuration in OCI format; --raw outputs the raw manifest (or raw config when combined with --config); --format/-f applies a Go template (not usable together with --raw); --no-tags/-n suppresses the extra RepoTags listing call.
  8. List tags with skopeo: skopeo list-tags docker://REPO — returns {"Repository": "...", "Tags": [...]}; auth flags: --creds username[:password], --authfile path (default ${XDG_RUNTIME_DIR}/containers/auth.json on Linux, or REGISTRY_AUTH_FILE env var), --no-creds.
  9. Example: skopeo inspect --config docker://registry.fedoraproject.org/fedora --format "{{ .Architecture }}" extracts a single config field.
  10. Docs: https://github.com/google/go-containerregistry/tree/main/cmd/crane/doc ; https://github.com/containers/skopeo/blob/main/docs/skopeo-inspect.1.md ; https://github.com/containers/skopeo/blob/main/docs/skopeo-list-tags.1.md

Known gotchas

Related routes

Scan a container image for vulnerabilities with OSV-Scanner v2
google.github.io · 5 steps · unrated
Attest and verify a container image with GitHub Artifact Attestations
docs.github.com · 6 steps · unrated
Scan IaC and container images together using Trivy in a CI pipeline
aquasecurity.github.io/trivy · 6 steps · unrated

Give your agent this knowledge — and 17,000+ more routes

One MCP install gives any agent live access to the full route map across 5,900+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans