Skip to content

feat(image): accept a bare image manifest as manifest.json - #64

Merged
tycho merged 1 commit into
mainfrom
steven/feat/manifest-json-image-manifest
Oct 5, 2026
Merged

tycho merged 1 commit into
mainfrom
steven/feat/manifest-json-image-manifest

Conversation

@tycho

@tycho tycho commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Without an index.json, ocirender only understood the manifest.json that docker save writes. A layout assembled from a registry's responses instead, with the image manifest itself saved as manifest.json, failed to load.

manifest.json is now read by shape: an array is still a Docker save manifest, and an object is a single OCI or Docker schema 2 image manifest. This is additive; existing layouts load exactly as before. Covered by parsing tests and an e2e fixture layout verified against umoci.

Supersedes #53.

@tycho
tycho force-pushed the steven/feat/manifest-json-image-manifest branch from 0d08b22 to 1e56a9e Compare October 5, 2026 18:03
@tycho
tycho added this pull request to stack #66 October 5, 2026 18:03
Without an index.json, `load_manifest` understood only the
manifest.json that `docker save` writes: an array with one entry per
tagged image, listing layers as relative blob paths. A layout assembled
from a registry's responses instead -- the image manifest saved as
manifest.json, its blobs under `blobs/sha256/` -- failed with "invalid
type: map, expected a sequence", even though the manifest is in the
standard OCI form.

Dispatch on the JSON's shape: an array is still read as a Docker save
manifest, unchanged, and an object is read as a single image manifest
into the existing `OciManifest` type. That covers OCI image manifests
and Docker's registry schema 2 manifests alike, since both list layers
as descriptors, and a layer without a `mediaType` falls back to
magic-byte detection as elsewhere. Any other object, such as an image
index saved under that name, is rejected with an error saying an image
manifest was expected.

Suggested-by: MrNavaStar <43613843+MrNavaStar@users.noreply.github.com>
Signed-off-by: Steven Noonan <steven@edera.dev>
@tycho
tycho force-pushed the steven/feat/manifest-json-image-manifest branch from 1e56a9e to 74e9503 Compare October 5, 2026 18:06
@tycho
tycho requested a review from azenla October 5, 2026 18:06
@tycho
tycho marked this pull request as ready for review October 5, 2026 18:06
@tycho
tycho merged commit 74e9503 into main Oct 5, 2026
2 checks passed
@tycho
tycho deployed to release October 5, 2026 18:10 — with GitHub Actions Active
@tycho
tycho deployed to release October 5, 2026 18:10 — with GitHub Actions Active
@tycho
tycho deleted the steven/feat/manifest-json-image-manifest branch October 5, 2026 18:10

This branch was successfully deployed

1 active deployment
release — 74e9503c Deployed Oct 5, 2026 by tycho via Release-plz PR #33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants