Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The first time I start clair-local-scan it crashes. Have to start clair-local-scan twice. #58

Open
larspederamlie opened this issue Apr 23, 2021 · 1 comment

Comments

@larspederamlie
Copy link

We've been running in Azure pipelines for over a year without any problems, but now we have to start the local scan twice.

This is our scan script:

docker run -d --name db arminc/clair-db
sleep 1 # wait for db to come up

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

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

sleep 1

DOCKER_GATEWAY=$(docker network inspect bridge --format "{{range .IPAM.Config}}{{.Gateway}}{{end}}")
wget -qO clair-scanner https://github.com/arminc/clair-scanner/releases/download/v8/clair-scanner_linux_amd64 && chmod +x clair-scanner
./clair-scanner -t Critical --ip="$DOCKER_GATEWAY" "${CONTAINERREGISTRYSERVICECONNECTION}.azurecr.io/${IMAGEREPOSITORY}:${IMAGETAG}"

docker stop db
docker stop clair

docker rm db
docker rm clair

@chadlwilson
Copy link

Same as #57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants