From 55a0e0e8cf8443b4332579c685d2bf500a0675f3 Mon Sep 17 00:00:00 2001 From: Russell Bunch Date: Tue, 31 Jan 2023 15:45:41 -0600 Subject: [PATCH] Fix clamAV clamAV scanning is failing to start its Docker container because the step invoking it is running within a Docker image. The `docker.sock` file needs to be mounted so Docker-in-Docker works. --- Jenkinsfile.github | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile.github b/Jenkinsfile.github index 54d7dd8..218e7ee 100644 --- a/Jenkinsfile.github +++ b/Jenkinsfile.github @@ -135,7 +135,8 @@ pipeline { agent { docker { - args '-u root' // Build Python RPMs as root for Python rpm macros to build with the right sitelib. + // Mount docker.sock so the clamAV container can run inside of the Docker image, we need to run in a Docker image to get the right os-release file. + args '-u root -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker --group-add 999' label "metal-gcp-builder" reuseNode true image "${pythonImage}:${PYTHON_VERSION}"