mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-19 00:32:34 +01:00
Get all running containers by name instead of by shor-uuid to improve readability in logs
Signed-off-by: alberto <alberto@tutum.co>
This commit is contained in:
parent
ec3fdfce3a
commit
de68752f30
1 changed files with 2 additions and 2 deletions
|
@ -81,8 +81,8 @@ main () {
|
||||||
labels=$(docker inspect --format '{{ .Config.Labels }}' "$c")
|
labels=$(docker inspect --format '{{ .Config.Labels }}' "$c")
|
||||||
contains "$labels" "docker-bench-security" && benchcont="$c"
|
contains "$labels" "docker-bench-security" && benchcont="$c"
|
||||||
done
|
done
|
||||||
# List all running containers except docker-bench
|
# List all running containers except docker-bench (use names to improve readability in logs)
|
||||||
containers=$(docker ps -q | grep -v "$benchcont")
|
containers=$(docker ps | sed '1d' | awk '{print $NF}' | grep -v "$benchcont")
|
||||||
|
|
||||||
for test in tests/*.sh
|
for test in tests/*.sh
|
||||||
do
|
do
|
||||||
|
|
Loading…
Reference in a new issue