mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-19 00:32:34 +01:00
Minor fix to ensure exclude only works against container name
Signed-off-by: Mike Ritter <mike.ritter@target.com>
This commit is contained in:
parent
dd61f061fc
commit
b37dfb95e3
1 changed files with 1 additions and 1 deletions
|
@ -92,7 +92,7 @@ main () {
|
||||||
containers=$(docker ps | sed '1d' | awk '{print $NF}')
|
containers=$(docker ps | sed '1d' | awk '{print $NF}')
|
||||||
else
|
else
|
||||||
pattern=$(echo "$exclude" | sed 's/,/|/g')
|
pattern=$(echo "$exclude" | sed 's/,/|/g')
|
||||||
containers=$(docker ps | sed '1d' | grep -Ev "$pattern" | awk '{print $NF}')
|
containers=$(docker ps | sed '1d' | awk '{print $NF}' | grep -Ev "$pattern" )
|
||||||
fi
|
fi
|
||||||
# If there is a container with label docker_bench_security, memorize it:
|
# If there is a container with label docker_bench_security, memorize it:
|
||||||
benchcont="nil"
|
benchcont="nil"
|
||||||
|
|
Loading…
Reference in a new issue