zot: crane cp fails

Describe the bug I tried to upload using crane and it failed.

bin/zot-darwin-arm64 serve examples/config-minimal.json

{"level":"info","module":"http","clientIP":"127.0.0.1:54199","method":"HEAD","path":"/v2/busybox/blobs/sha256:62aedd01bd8520c43d06b09f7a0f67ba9720bdc04631a8242c65ea995f3ecac8","statusCode":200,"latency":"498.167µs","bodySize":0,"headers":{"User-Agent":["crane/0.10.0 go-containerregistry/(devel)"]},"goroutine":82,"caller":"zotregistry.io/zot/pkg/api/session.go:132","time":"2022-07-13T10:57:01.683065-07:00","message":"HTTP API"}
{"level":"info","module":"http","clientIP":"127.0.0.1:54199","method":"PUT","path":"/v2/busybox/manifests/sha256:dcdf379c574e1773d703f0c0d56d67594e7a91d6b84d11ff46799f60fb081c52","statusCode":415,"latency":"6.292µs","bodySize":0,"headers":{"Accept-Encoding":["gzip"],"Content-Length":["527"],"Content-Type":["application/vnd.docker.distribution.manifest.v2+json"],"User-Agent":["crane/0.10.0 go-containerregistry/(devel)"]},"goroutine":82,"caller":"zotregistry.io/zot/pkg/api/session.go:132","time":"2022-07-13T10:57:01.683779-07:00","message":"HTTP API"}
> crane cp busybox localhost:8080/busybox:latest

2022/07/13 10:57:00 Copying from busybox to localhost:8080/busybox:latest
2022/07/13 10:57:01 existing blob: sha256:19d511225f94f9b5cbf3836eb02b5273c01b95da50735742560e3e45b8c8bfcc
2022/07/13 10:57:01 existing blob: sha256:62aedd01bd8520c43d06b09f7a0f67ba9720bdc04631a8242c65ea995f3ecac8
Error: failed to copy index: PUT http://localhost:8080/v2/busybox/manifests/sha256:dcdf379c574e1773d703f0c0d56d67594e7a91d6b84d11ff46799f60fb081c52: unexpected status code 415 Unsupported Media Type

To Reproduce Steps to reproduce the behavior:

  1. Configuration
  2. Client tool used
  3. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 31 (14 by maintainers)

Most upvoted comments

@rchincha I understand the decision to only support the OCI spec but from an end users perspective it feels limiting to not be able to copy existing Docker images as-is . I think supporting enough of the Docker registry features to provide a smooth UX is worth the trouble.

I am very new to docker registry internals and standards. So, please take my opinion with a giant grain of a salt.

The downside of converting manifests to the OCI media types is the digest is modified in the process. That means you can no longer include image signing metadata on the image, and users cannot pin to a digest from a trusted external source. Tools that do the conversion aren’t that widespread, and tools to build container images still strongly favor the Docker media types.

@tamalsaha FYI, https://github.com/project-zot/zot/releases/tag/v1.4.2 is now officially released which includes the multi-arch support.

@itaysk, see @rchincha’s comment above, only the OCI media types are supported, not the docker ones: https://github.com/project-zot/zot/issues/622#issuecomment-1184655793

True. @tamalsaha pls evaluate if this is a serious limitation for you - basically, cross-repo copying and cross-repo references.

That said, if you want to control your entire pipeline …

https://github.com/project-stacker/stacker https://github.com/chainguard-dev/apko https://github.com/sigstore/cosign

PS: we are rolling out a -rc release to address the multi-arch requirement.

@tamalsaha https://github.com/project-zot/zot/releases/tag/v1.4.2-rc5 is now available which should address the multi-arch requirement.

Tracking the work in a separate issue: https://github.com/project-zot/zot/issues/640

and closing this one.