update restart_policy w/o swarm

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
Thomas Sjögren 2023-09-25 15:29:45 +00:00
parent ab2190819d
commit e680ab2465
No known key found for this signature in database

View file

@ -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