optiopay / klar

Integration of Clair and Docker Registry
MIT License
505 stars 138 forks source link

Scan GCR public container images #42

Closed xueshanf closed 7 years ago

xueshanf commented 7 years ago

I am wondering how to scan public images hosted on GCR, e.g. gcr.io/google-containers/busybox. No authentication is needed in this case, but klar would give this error:

docker run --env-file=envs my-klar gcr.io/google-containers/busybox
Can't pull image: Can't parse Www-Authenticate: Basic realm=""

My envs contains no DOCKER_USER and DOCKER_PASSWORD:

CLAIR_ADDR=https://clair.example.com

Thanks!

supereagle commented 7 years ago

@hashmap Could we update the GCR support like Amazon ECR support in README?

hashmap commented 7 years ago

@xueshanf thanks for reporting! It seems we introduced a regression - if DOCKER_USER is not specified Klar can't pull even public images

@supereagle it's not related to GCR, this is a bug

hashmap commented 7 years ago

@xueshanf please test version 1.4.1, it should be fixed

xueshanf commented 7 years ago

@hashmap Yup! It's fixed. Thanks for fast response. Great tool!

supereagle commented 7 years ago

@hashmap Thanks for fixing.