optiopay / klar

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

Can't scan images via Clair #3

Closed seanlutner closed 8 years ago

seanlutner commented 8 years ago

I'll start by saying that I'm not sure if this is an issue with Klar or with Clair itself. I've setup two different instances of Klar and Clair (local on my laptop and on a remote system) and I am seeing errors when trying to scan any Docker images.

→ ./klar my_team/centos7
Can't pull image: Token request returned 401%                                                                                                    
→ ./klar registry.domain.com:31832/my_team/centos7
Decode error
Can't pull image: json: cannot unmarshal number into Go value of type docker.Image% ```

When I look at the logs from the Clair container, I see no errors and I've set CLAIR_ADDR to the clair instance. Any idea what's happening and what I can do to fix it?
hashmap commented 8 years ago

Thanks for your report. Klar tries to follow docker images output convention for image naming to make UX better. Which means:

hashmap commented 8 years ago

Please try a new version (v 1.1)

seanlutner commented 8 years ago

Awesome, that worked! Thanks for the super fast turn around. On additional question. Is Klar doing the docker pull on the image or is that passed off to Clair? My registry uses an internally signed SSL certificate, so I'm wondering where I need to add that as trusted.

hashmap commented 8 years ago

Cool. Klar retrieves only metadata via HTTPS and send it to Clair which pulls layer by layer, so technically both components make requests to the registry.