From de68752f30939397eaf01f889a4b2473c93e9e73 Mon Sep 17 00:00:00 2001 From: alberto Date: Thu, 23 Jul 2015 11:14:13 +0200 Subject: [PATCH] Get all running containers by name instead of by shor-uuid to improve readability in logs Signed-off-by: alberto --- docker-bench-security.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-bench-security.sh b/docker-bench-security.sh index e1e6503..41e9087 100755 --- a/docker-bench-security.sh +++ b/docker-bench-security.sh @@ -81,8 +81,8 @@ main () { labels=$(docker inspect --format '{{ .Config.Labels }}' "$c") contains "$labels" "docker-bench-security" && benchcont="$c" done - # List all running containers except docker-bench - containers=$(docker ps -q | grep -v "$benchcont") + # List all running containers except docker-bench (use names to improve readability in logs) + containers=$(docker ps | sed '1d' | awk '{print $NF}' | grep -v "$benchcont") for test in tests/*.sh do