Virus scan inside docker image

1.4k Views Asked by At

I build a docker image for my customer with my application. The customer wants a virus scan for the image. But how can I scan for virus inside an image? Can I install an antivirus software on my machine and it scans inside the image or do I need a special tool for this? Inside the image I don't want to install antivirus software because it mustn't run at the customer's server. If it is possible I want to add this step to my CI/CD pipeline in Jenkins.

1

There are 1 best solutions below

3
D3PSI On

A scan of the host operating system should suffice as it will scan all files, including docker-layers of your images. But, I am asking myself how much sense it makes to scan a docker image YOU are providing and building software for?