You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Request]: container image load cannot load legacy Docker tarfiles created by the Google Jib Gradle plugin. #1426
We could consider handling this in a utility somewhere within container that converts an unpacked docker image archive into an OCI archive in-place, instead of adding support for the legacy docker format in the Containerization image store itself.
In ImagesService.load(from:force:) (Sources/Services/ContainerImagesService/Server/ImagesService.swift), after reader.extractContents(to: tempDir), detect the archive layout:
tempDir/oci-layout present -> already OCI, no-op
tempDir/manifest.json present -> docker-archive, convert in place
neither -> fall through to current behavior (existing oci-layout error, no regression)
The conversion would parse manifest.json, hash the config + layer files into blobs/sha256/<digest>, build OCI manifests + index.json, and write oci-layout so the existing imageStore.load(from: tempDir) call works unchanged. Conversion stays in apple/container per your suggestion in the issue body.
The Jib reproducer attached to the issue is what I'd use as the test fixture.
A couple of quick design questions before I open a PR:
Multi-tag manifest.json handling - I'd build one OCI manifest per entry and reference all of them from index.json. Match expectations?
Any preference between (a) doing conversion only when oci-layout is absent and manifest.json is present, or (b) detecting via the mediaType field in manifest.json's entries?
Happy to send a PR if this lines up with the direction you have in mind.
Activity
mvanhorn commentedon Apr 29, 2026
Considering taking this. The plan I'd propose:
In
ImagesService.load(from:force:)(Sources/Services/ContainerImagesService/Server/ImagesService.swift), afterreader.extractContents(to: tempDir), detect the archive layout:tempDir/oci-layoutpresent -> already OCI, no-optempDir/manifest.jsonpresent -> docker-archive, convert in placeoci-layouterror, no regression)The conversion would parse
manifest.json, hash the config + layer files intoblobs/sha256/<digest>, build OCI manifests +index.json, and writeoci-layoutso the existingimageStore.load(from: tempDir)call works unchanged. Conversion stays in apple/container per your suggestion in the issue body.The Jib reproducer attached to the issue is what I'd use as the test fixture.
A couple of quick design questions before I open a PR:
manifest.jsonhandling - I'd build one OCI manifest per entry and reference all of them fromindex.json. Match expectations?oci-layoutis absent andmanifest.jsonis present, or (b) detecting via themediaTypefield inmanifest.json's entries?Happy to send a PR if this lines up with the direction you have in mind.