crane: index filter
finds the image has a legacy format thus do not support, while manifest
says opposite
#1720
Labels
bug
Something isn't working
Describe the bug
I was utilizing the
crane index filter
to only sync images to a private registry and filter out architectures that I did not care about.However, I could not get it to work for image
docker.io/neuvector/scanner:latest
. crane reportedError: pulling docker.io/neuvector/scanner:latest: unsupported MediaType: "application/vnd.docker.distribution.manifest.v1+prettyjws", see https://github.com/google/go-containerregistry/issues/377
I dug in and found out that the manifest of neuvector image did comply with the schema V2, and this only deepens the puzzle.
It looks more likely a bug rather than a deformation of the docker images, so I reached here before reporting to the neuvector community.
Any help would be appreciated ;-)
To Reproduce
crane --verbose index filter docker.io/neuvector/scanner:latest --platform linux/amd64 -t "$dest"
Referring to issue #377, I executed the following command for troubleshooting.
The result looks fine to me, and it seems to tell the opposite, that the schema version of docker image is actually V2, not V1.
crane --verbose manifest docker.io/neuvector/scanner:latest
Expected behavior
crane --verbose index filter "$src" --platform linux/amd64 -t "$dest"
should be able to copy any legitimate images to a private registry.I found the command
crane copy docker.io/neuvector/scanner:latest "$dest"
does work for me, but I was syncing a bunch of images here.crane index filter "$src" --platform linux/amd64 --platform linux/arm64 -t "$dest"
works even if the image does not have alinux/arm64
manifest, and I do not want to copy manifest of architectures that I do not need.Additional context
crane version
The text was updated successfully, but these errors were encountered: