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

Pull schema v1 image with content-type text/plain manifest fails #617

Closed
dvob opened this issue Nov 17, 2019 · 1 comment
Closed

Pull schema v1 image with content-type text/plain manifest fails #617

dvob opened this issue Nov 17, 2019 · 1 comment

Comments

@dvob
Copy link
Contributor

dvob commented Nov 17, 2019

I try to pull an image from registry.access.redhat.com but it fails. With docker pull i'am able to get the image. It seems that the registry responds with the wrong Content-Type. Would it be possible to make go-containerregistry more tolerant to handle such a case?

$ ./crane  pull registry.access.redhat.com/rhel7/rhel-atomic:7.3 abc.img
2019/11/17 22:50:36 No matching credentials were found, falling back on anonymous
2019/11/17 22:50:37 Unexpected media type for Image(): text/plain
2019/11/17 22:50:38 saving tarball abc.img: unsupported status code 404; body: File not found."
@jonjohnsonjr
Copy link
Collaborator

Would it be possible to make go-containerregistry more tolerant to handle such a case?

It's possible, but I'm pretty reluctant to do so. We assume pretty much everywhere a schema 2 structure, and I'd really love schema 1 to die, rather than let it limp along by supporting it.

There's some discussion here: #377

It looks like these images are published as schema 2 as of registry.access.redhat.com/rhel7/rhel-atomic:7.5

If schema 1 support is really crucial for you, I'd consider a PR that does up-conversion to schema 2 when pulling it, but that up-conversion is pretty expensive, so I'd prefer just considering it wontfix and trying to move the world forward.

Sorry :/

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

No branches or pull requests

2 participants