estesp / manifest-tool

Command line tool to create and query container image manifest list/indexes
Apache License 2.0
737 stars 92 forks source link

[feature request] allow to display OCI image manifest #222

Closed marcosnils closed 1 year ago

marcosnils commented 1 year ago

Sometimes I want to check what an image manifest looks like to see its OCI configuration (entrypoint, cmd, env vars, etc) without having to pull the actual image. I'd be awesome if manifest-tool could with that so I don't have to pull the image and perform an inspect afterwards :pray:

estesp commented 1 year ago

PR #225 expands config objects in raw JSON (when used with --raw) when the result is a single image (not index/manifest lists). If you want to expand the config of an image in an index/manifest list, you can grab the sha256 from the index output and pass it back to inspect with --expand-config to get the config for that single image entry. This seems like a reasonable compromise to having to complicate the index/manifest list output with different JSON structs depending on whether we are expanding the config section or not.