arminc / clair-scanner

Docker containers vulnerability scan
Apache License 2.0
848 stars 154 forks source link

Unable to scan the images #104

Open meruvavenkatesh opened 4 years ago

meruvavenkatesh commented 4 years ago

Hi,

Following the Github URL - https://github.com/arminc/clair-scanner to scan the images in docker platform. I observed two issues as below.

  1. Not able to run "go get -d -u github.com/arminc/clair-scanner" this command, but I have installed go, deb packages.

  2. Not able to scan the images ubuntu@ip-10-0-124-61:~/go/src/github.com/arminc/clair-scanner$ clair-scanner --ip=172.17.0.1 aiindevops.azurecr.io/aiindevops/onprem/kibana:6.4.2 2020/04/21 14:30:23 [INFO] ▶ Start clair-scanner 2020/04/21 14:30:34 [INFO] ▶ Server listening on port 9279 2020/04/21 14:30:34 [INFO] ▶ Analyzing b4c3450571ef813dd4b9a81c51bea12c5f062f34dee11fdb9c7ccd005b970382 2020/04/21 14:30:34 [CRIT] ▶ Could not analyze layer: POST to Clair failed Post http://127.0.0.1:6060/v1/layers: dial tcp 127.0.0.1:6060: connect: connection refused

Please guide me

wuxler commented 4 years ago

Hi,

Following the Github URL - https://github.com/arminc/clair-scanner to scan the images in docker platform. I observed two issues as below.

  1. Not able to run "go get -d -u github.com/arminc/clair-scanner" this command, but I have installed go, deb packages.
  2. Not able to scan the images ubuntu@ip-10-0-124-61:~/go/src/github.com/arminc/clair-scanner$ clair-scanner --ip=172.17.0.1 aiindevops.azurecr.io/aiindevops/onprem/kibana:6.4.2 2020/04/21 14:30:23 [INFO] arrow_forward Start clair-scanner 2020/04/21 14:30:34 [INFO] arrow_forward Server listening on port 9279 2020/04/21 14:30:34 [INFO] arrow_forward Analyzing b4c3450571ef813dd4b9a81c51bea12c5f062f34dee11fdb9c7ccd005b970382 2020/04/21 14:30:34 [CRIT] arrow_forward Could not analyze layer: POST to Clair failed Post http://127.0.0.1:6060/v1/layers: dial tcp 127.0.0.1:6060: connect: connection refused

Please guide me

  1. Maybe you need to start 2 containers before run clair-scanner ? Reference here: https://github.com/arminc/clair-local-scan You need to execute docker run -d --name clair-db arminc/clair-db:latest and docker run -p 6060:6060 --link clair-db:postgres -d --name clair arminc/clair-local-scan:latest first. Then build local and execute scanner.