mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-18 16:22:33 +01:00
Fix "nohealthlocal: command not found" error
This commit is contained in:
parent
2132b03b92
commit
9ae0d92b5d
1 changed files with 3 additions and 3 deletions
|
@ -1055,17 +1055,17 @@ check_5_26() {
|
||||||
totalChecks=$((totalChecks + 1))
|
totalChecks=$((totalChecks + 1))
|
||||||
|
|
||||||
fail=0
|
fail=0
|
||||||
nohealthlocal check=""
|
nohealthcheck_containers=""
|
||||||
for c in $containers; do
|
for c in $containers; do
|
||||||
if ! docker inspect --format '{{ .Id }}: Health={{ .State.Health.Status }}' "$c" 2>/dev/null 1>&2; then
|
if ! docker inspect --format '{{ .Id }}: Health={{ .State.Health.Status }}' "$c" 2>/dev/null 1>&2; then
|
||||||
if [ $fail -eq 0 ]; then
|
if [ $fail -eq 0 ]; then
|
||||||
warn "$check"
|
warn "$check"
|
||||||
warn " * Health check not set: $c"
|
warn " * Health check not set: $c"
|
||||||
nohealthlocal check="$nohealthcheck_containers $c"
|
nohealthcheck_containers="$nohealthcheck_containers $c"
|
||||||
fail=1
|
fail=1
|
||||||
else
|
else
|
||||||
warn " * Health check not set: $c"
|
warn " * Health check not set: $c"
|
||||||
nohealthlocal check="$nohealthcheck_containers $c"
|
nohealthcheck_containers="$nohealthcheck_containers $c"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue