Optimized docker-health-check

This commit is contained in:
Kevin Veen-Birkenbach 2023-03-26 17:31:50 +02:00
parent 24fdaa2c70
commit 5d44c17493

View File

@ -1,6 +1,6 @@
#!/bin/sh
docker_ps_grep_unhealthy="$(docker ps | grep unhealthy)"
docker_ps_grep_exited="$(docker ps -a | grep Exited)"
docker_ps_grep_unhealthy="$(docker ps --filter health=unhealthy)"
docker_ps_grep_exited="$(docker ps --filter status=exited)"
exitcode=0
if [ ! -z "$docker_ps_grep_unhealthy" ]
then