optiopay / klar

Integration of Clair and Docker Registry
MIT License
507 stars 140 forks source link

Can't pull fsLayers with public GCR image #83

Closed witten closed 6 years ago

witten commented 6 years ago

I've deployed Clair into a Kubernetes cluster from the released quay.io/coreos/clair:v2.0.1 Docker image. I'm trying to use Klar 2.0.1 to scan a public image hosted on gcr.io, Google's container registry. But when I do that, I'm getting the Can't pull fsLayers error:

Here's the command I'm running:

CLAIR_ADDR=http://localhost:6060 ./klar-2.0.1-linux-amd64 gcr.io/google_containers/addon-resizer:1.0

I get this error for any public gcr.io image, while images hosted elsewhere scan just fine. Note that I'm not running any of this on GCP and I'm not using a private image, so I'm not authenticating with the instructions here: https://github.com/optiopay/klar#google-gcr-support

hashmap commented 6 years ago

GCR supports only docker manifest V1, we somehow dropped support of V1, I've fixed this regression, sending a patch. Here is the reason: Manifest with tag '1.0' has media type 'application/vnd.docker.distribution.manifest.v1+prettyjws', but client accepts 'application/vnd.docker.distribution.manifest.v2+json

hashmap commented 6 years ago

Fixed in 2.0.2

witten commented 6 years ago

Awesome, thanks!