From 2dbfdd112f118f90a975e293cf23eb1443b662ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sj=C3=B6gren?= Date: Fri, 19 Jun 2015 23:31:44 +0200 Subject: [PATCH] consistent labeling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Sjögren --- README.md | 2 +- docker-bench-security.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a1602ad..5ed00ec 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ docker run -it --net host --pid host --cap-add audit_control \ -v /var/lib:/var/lib \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /usr/lib/systemd:/usr/lib/systemd \ - -v /etc:/etc --label security-benchmark \ + -v /etc:/etc --label docker-bench-security \ docker-bench-security ``` diff --git a/docker-bench-security.sh b/docker-bench-security.sh index 18bb973..690c41f 100755 --- a/docker-bench-security.sh +++ b/docker-bench-security.sh @@ -73,11 +73,11 @@ done main () { # List all running containers containers=$(docker ps -q) - # If there is a container with label docker-bench, memorize it: + # If there is a container with label docker-bench-security, memorize it: benchcont="nil" for c in $containers; do labels=$(docker inspect --format '{{ .Config.Labels }}' "$c") - contains "$labels" "docker-bench" && benchcont="$c" + contains "$labels" "docker-bench-security" && benchcont="$c" done # List all running containers except docker-bench containers=$(docker ps -q | grep -v "$benchcont")