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

crane: Skopeo copy of gcr crane image fails with unknown media type #1608

Closed
davidrfreeman opened this issue Mar 21, 2023 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@davidrfreeman
Copy link

Describe the bug

When attempting a skopeo copy of the v0.14.0 image, it fails due to the following error

Unknown media type during manifest conversion: "application/vnd.docker.image.rootfs.diff.tar.gzip"

I believe this is related to this issue previously seen with a ko build of tekton
tektoncd/pipeline#5188

v0.13.0 does not have this issue

➜ skopeo copy --override-os linux --additional-tag gcr.io/go-containerregistry/crane:v0.14.0 docker://gcr.io/go-containerregistry/crane@sha256:4e0a096b2f61284e581a9e156e5595cebeccb074aa6289c593b352264279599d docker-archive:gcr.io-go-containerregistry-crane-v0.14.0.tar
Getting image source signatures
Copying blob 10f855b03c8a done
Copying blob fe5ca62666f0 done
Copying blob b438aade3922 done
Copying blob fcb6f6d2c998 done
Copying blob e8c73c638ae9 done
Copying blob 1e3d9b7d1452 done
Copying blob 4aa0ea1413d3 done
Copying blob 7c881f9ab25e done
Copying blob 5627a970d25e done
Copying blob 72164b581b02 done
Copying blob 6ff4dd532deb done
FATA[0004] copying system image from manifest list: creating an updated image manifest: Unknown media type during manifest conversion: "application/vnd.docker.image.rootfs.diff.tar.gzip"

Looking at the layers for the amd64 image, the manifest says it's an OCI formatted image, but there are Docker layers in the manifest.

➜ crane manifest gcr.io/go-containerregistry/crane:v0.14.0 | jq '.manifests[] | select(.platform.architecture | contains("amd64")) | .digest' | xargs -I{} crane manifest gcr.io/go-containerregistry/crane@{} | jq '.layers[] | select(.mediaType | contains("docker"))'
{
  "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
  "size": 98,
  "digest": "sha256:72164b581b02b1eb297b403bcc8fc1bfa245cb52e103a3a525a0835a58ff58e2"
}
{
  "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
  "size": 8410379,
  "digest": "sha256:6ff4dd532debff59c2a7155e3f2556fd43461c7f09814c6d9b1a172eccaca00d"
}

To Reproduce

Copy v0.14.0 using skopeo version 1.11.1

Expected behavior

A skopeo copy successfully copies the image, with all layers being OCI formatted.

Additional context

Add any other context about the problem here.

  • Output of crane version
    • ➜ crane version
      0.14.0
      
  • Registry used (e.g., GCR, ECR, Quay)
    • GCR
@davidrfreeman davidrfreeman added the bug Something isn't working label Mar 21, 2023
@imjasonh
Copy link
Collaborator

I believe this is a duplicate of #1606 fixed by #1607

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants