arminc / clair-scanner

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

[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: getsockopt: connection refused #135

Open mandarpimplapure opened 1 year ago

mandarpimplapure commented 1 year ago

Hi,

I pulled mentioned 2 docker images and trying to scan the docker images for vulerabilities but getting an error :

docker run -p 5432:5432 -d --name db arminc/clair-db:latest
docker run -p 6060:6060 --link db:postgres -d --name clair arminc/clair-local-scan:latest

Also have a binary to scan the images. However, I keep getting the below:

./clair-scanner_linux_386 -r "report.json" --ip {IP-of-clair-container} {image-name} 2023/07/14 08:06:27 [INFO] ▶ Start clair-scanner 2023/07/14 08:06:45 [INFO] ▶ Server listening on port 9279 2023/07/14 08:06:45 [INFO] ▶ Analyzing 22a104181b6084cc73415709a1929a8282d2da7196e57cd300ca72f5a45b835e 2023/07/14 08:06:45 [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: getsockopt: connection refused