From 26f80fb331471621018832a09f6fee8054e7483c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sj=C3=B6gren?= Date: Fri, 25 Aug 2023 12:17:48 +0000 Subject: [PATCH] Fix image sprawl miscalculation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Sjögren --- tests/6_docker_security_operations.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/6_docker_security_operations.sh b/tests/6_docker_security_operations.sh index ed96e5d9..8bc1efbf 100644 --- a/tests/6_docker_security_operations.sh +++ b/tests/6_docker_security_operations.sh @@ -20,7 +20,7 @@ check_6_1() { images=$(docker images -q | sort -u | wc -l | awk '{print $1}') active_images=0 - for c in $(docker inspect --format "{{.Image}}" "$(docker ps -qa)" 2>/dev/null); do + for c in $(docker inspect --format "{{.Image}}" $(docker ps -qa) 2>/dev/null); do if docker images --no-trunc -a | grep "$c" > /dev/null ; then active_images=$(( active_images += 1 )) fi