-
Notifications
You must be signed in to change notification settings - Fork 237
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
Trivy-action fails on local images in self hosted GHA runners dind mode - EKS #359
Comments
I've never tried running Trivy-action with self hosted runners so I can't comment much. It might be very well the case that it isn't supported today to run on self hosted runners. We can keep this issue for the community to share any insight with us. |
I am confident as well that it is an issue with docker sockets. We use runnersets using actions-runner-controller in kubernetes, and use docker-in-docker for each runner that gets spun up. The recommendation for dind with ARC is to use Can't use One thing I haven't tried is to use TCP based docker sockets, which may then be accessible regardless of the filesystem being mounted (and only the necessary environment variable or configuration). A temporary workaround which we are using, however, is to export the image using |
I use |
@gfrid would you mind sharing your configuration (with all the sensitive bits stripped) for how you deploy the runnerset that works, along with how you invoke the trivy action? |
you need to use the lates arc-runner-set not the old project and set your own values in the arc-runners-set in the values file enable DIND: containerMode: then if you want configure additional setting like dockerhub login credentials you can do like this:
|
Hi,
I would like to raise an issue with trivy-action running in self-hosted runners hosted in EKS with docker in docker mode.
When I try to run trivy scan in these runners I'm always getting the following error message:
docker error: unable to inspect the image (testimage): Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
My workflow works well with Github provided ubuntu runners.
I think the problem is somewhere with the docker sockets, because everything else works with docker only trivy is not able to see the locally builded images. If I try to scan an image from a remote repository that works fine. I also tried to use the docker cli to run the trivy against the builded image with
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock aquasec/trivy image <image>
without any success.If you have any idea what could be wrong please don't hesitate to share your thoughts.
The text was updated successfully, but these errors were encountered: