Skip to content

[Bug]: OCI archives without manifest descriptor annotations fail to import #369

@blark

Description

@blark

Description

OCI archives without manifest descriptor annotations fail to load with Error: internalError: "Failed to import image". Per the OCI Image Spec, these annotations are optional.

Reproduction

  1. Create an OCI archive without manifest descriptor annotations (e.g., using nix2container)
  2. Run container i load -i archive.tar
  3. Result: Error: internalError: "Failed to import image"

Root Cause

LocalOCILayoutClient.getImageReferencefromDescriptor returns nil when annotations are missing, causing the manifest to be skipped in the import loop (ImageStore+OCILayout.swift:82-85).

Possible Solutions

  1. Use archive filename for image name, then fall back to digest-based reference: "untagged@\(descriptor.digest)"
  2. Add a --ref name:tag flag to container i load for specifying the image name and tag
  3. Provide a clearer error message explaining annotations are required

Docker/Podman handle this by displaying untagged images as <none>:<none>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions