Container Scanning is randomly failing

Summary

Container Scanning is randomly failing with a timeout trying to reach Clair daemon

Steps to reproduce

Run Container Scanning job.

Example Project

https://gitlab.com/gitlab-org/security-products/sast/-/jobs/64585348

What is the current bug behavior?

Job fails randomly

What is the expected correct behavior?

Job succeeds

Relevant logs and/or screenshots

$ retries=0
$ echo "Waiting for clair daemon to start"
Waiting for clair daemon to start
$ while( ! wget -T 10 -q -O /dev/null http://docker:6060/v1/namespaces ) ; do sleep 1 ; echo -n "." ; if [ $retries -eq 10 ] ; then echo " Timeout, aborting." ; exit 1 ; fi ; retries=$(($retries+1)) ; done
........... Timeout, aborting.
Edited by Olivier Gonzalez