mirror of
https://github.com/docker/docker-bench-security.git
synced 2024-11-01 00:21:45 +01:00
update restart_policy w/o swarm
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
parent
ab2190819d
commit
e680ab2465
1 changed files with 3 additions and 1 deletions
|
@ -609,7 +609,9 @@ check_5_14() {
|
|||
fi
|
||||
done
|
||||
fi
|
||||
restart_policy=$(docker inspect --format '{{ .HostConfig.RestartPolicy.MaximumRetryCount }}' "$c")
|
||||
if docker inspect --format '{{ .HostConfig.RestartPolicy.MaximumRetryCount }}' "$c" &>/dev/null; then
|
||||
restart_policy=$(docker inspect --format '{{ .HostConfig.RestartPolicy.MaximumRetryCount }}' "$c")
|
||||
fi
|
||||
|
||||
if [ "$restart_policy" -gt "5" ]; then
|
||||
# If it's the first container, fail the test
|
||||
|
|
Loading…
Reference in a new issue