Skip to content

[Request]: Tolerate sparse OCI images on import. #959

Description

@jglogan

Feature or enhancement request details

Docker with the containerd image store (the default in recent Docker releases) keeps the full index of a multi-platform image, but only the content for platforms that were pulled. docker save writes that index as is, followed by the blobs it has. If you pull quay.io/coreos/etcd:v3.7.1 on an arm64 machine and run docker save, you get an archive like this:

  • index.json points at the upstream multi-platform index (linux/amd64, linux/arm64, linux/ppc64le, linux/s390x, and often attestation manifests with platform unknown/unknown).
  • Only the linux/arm64 manifest, config and layer blobs are present.

ImageStore.load(from:) fails on OCI image-layout archives whose index lists manifests for more platforms than the archive actually carries. For example:

$ container image load < etcd.tar
Error: missingContent("sha256:9fc5c86dedacb9612f37ff492edd642b18ffc9dab389deab4a343b1cdf217f6e")

The digest is the linux/amd64 manifest. It is listed by the image index, but neither it nor its config or layers are in the archive. The error gives no indication of that.

Cause

ImportOperation.import walks the index and fetches every child with fetchAll. LocalOCILayoutClient throws missingContent for the first manifest that isn't in the archive, which aborts the whole import. Archives that point index.json directly at a single image manifest load fine.

Proposed behavior

  • When importing from an OCI layout, tolerate manifests listed by an index that are not in the archive. Import the platforms that are present, and keep the original index so the stored image looks like a pull of the native platform only.
  • Keep failing when a platform whose manifest is present is missing its config or layers.
  • If none of the platforms listed by the index are present, fail with an error that names the missing platforms and manifest digests instead of a bare missingContent(<digest>).

Selecting a specific platform to load (for example a --platform option in container image load) is a separate change.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added this to the 26w42 milestone on Oct 9, 2026
  2. self-assigned this
    on Oct 9, 2026
  3. added theissue type on Oct 9, 2026
  4. added a commit that references this issue on Oct 12, 2026
    d7b18a1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions