Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create-spec: support images with nested index #208

Merged
merged 1 commit into from
Jan 15, 2024
Merged

create-spec: support images with nested index #208

merged 1 commit into from
Jan 15, 2024

Conversation

ktock
Copy link
Owner

@ktock ktock commented Jan 15, 2024

This commit fixes create-spec to allow processing nested image index and tries to fix #207 .

$ mkdir /tmp/testimg2
$ crane pull --format=oci alpine:3.14 /tmp/testimg2/
$ cat /tmp/testimg2/index.json
{
   "schemaVersion": 2,
   "mediaType": "application/vnd.oci.image.index.v1+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
         "size": 1638,
         "digest": "sha256:0f2d5c38dd7a4f4f733e688e3a6733cb5ab1ac6e3cb4603a5dd564e5bfb80eed"
      }
   ]
}
...
$ buildx build --progress=plain --build-arg TARGETARCH=amd64 --build-arg TARGETPLATFORM=linux/amd64 --platform=linux/amd64 -f Dockerfile --build-context assets=. --output type=local,dest=/tmp/out --build-arg OUTPUT_NAME=out.wasm --build-arg LINUX_LOGLEVEL=0 --build-arg INIT_DEBUG=false /tmp/testimg2
...
#22 0.081 Trying to unpack image as an OCI image
#22 0.081 nested manifest: processing [{application/vnd.docker.distribution.manifest.v2+json sha256:d6b6cdc5273a8950b39d09ce83f49716daead8624489fb76a70a3b45c343c3c6 528 [] map[] [] 0xc0000765a0 }]

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
@ktock ktock changed the title create-spec: support images with nested index create-spec: support images with nested index Jan 15, 2024
@ktock ktock marked this pull request as ready for review January 15, 2024 08:01
@ktock ktock merged commit da3f35c into main Jan 15, 2024
13 checks passed
@ktock ktock deleted the nestedidx branch January 15, 2024 08:01
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.

Fail to transform locally built image: panic: unsupported mediatype application/vnd.oci.image.index.v1+json
1 participant