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

Surface better error messages in crane index #1722

Merged
merged 1 commit into from
Jun 5, 2023

Conversation

jonjohnsonjr
Copy link
Collaborator

@jonjohnsonjr jonjohnsonjr commented Jun 5, 2023

If we're trying to do things to a non-index, we should fail earlier.

Fixes: #1720

Before:

$ crane index filter docker.io/neuvector/scanner:latest --platform linux/amd64
Error: pulling docker.io/neuvector/scanner:latest: unsupported MediaType: "application/vnd.docker.distribution.manifest.v1+prettyjws", see https://github.com/google/go-containerregistry/issues/377

After:

$ crane index filter docker.io/neuvector/scanner:latest --platform linux/amd64
Error: expected docker.io/neuvector/scanner:latest to be index, got "application/vnd.docker.distribution.manifest.v2+json"

If we're trying to do things to a non-index, we should fail earlier.
@imjasonh imjasonh merged commit 037ab31 into google:main Jun 5, 2023
18 checks passed
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.

crane: index filter finds the image has a legacy format thus do not support, while manifest says opposite
2 participants