From 07053bfd38648ad588f35475a1c62fbcabce8feb Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Tue, 28 Mar 2023 11:46:05 +0200 Subject: [PATCH] Solved docler-health-check.sh bug --- roles/native-docker-health-check/files/docker-health-check.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/native-docker-health-check/files/docker-health-check.sh b/roles/native-docker-health-check/files/docker-health-check.sh index f6c74efe..5ae70f89 100644 --- a/roles/native-docker-health-check/files/docker-health-check.sh +++ b/roles/native-docker-health-check/files/docker-health-check.sh @@ -1,6 +1,6 @@ #!/bin/sh -docker_ps_grep_unhealthy="$(docker ps --filter health=unhealthy)" -docker_ps_grep_exited="$(docker ps --filter status=exited)" +docker_ps_grep_unhealthy="$(docker ps --filter health=unhealthy --format '{{.Names}}')" +docker_ps_grep_exited="$(docker ps --filter status=exited --format '{{.Names}}')" exitcode=0 if [ ! -z "$docker_ps_grep_unhealthy" ] then