exclude docker-bench-security container

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
Thomas Sjögren 2018-11-23 10:50:34 +01:00
commit 9d9da6d375
2 changed files with 2 additions and 2 deletions

View file

@ -95,7 +95,7 @@ beginjson "$version" "$(date +%s)"
main () {
# If there is a container with label docker_bench_security, memorize it:
benchcont="nil"
for c in $containers; do
for c in $(docker ps | sed '1d' | awk '{print $NF}'); do
if docker inspect --format '{{ .Config.Labels }}' "$c" | \
grep -e 'docker.bench.security' >/dev/null 2>&1; then
benchcont="$c"