From 2d895e859a51a8b7d6e0214f746d38745829aeb5 Mon Sep 17 00:00:00 2001 From: Norman Rzepka Date: Mon, 21 Jan 2019 11:58:19 +0100 Subject: [PATCH 1/2] Update docker-entrypoint When using the default start period, autoheal always prints `Monitoring containers for unhealthy status in second(s)` --- docker-entrypoint | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker-entrypoint b/docker-entrypoint index 91498d0..b310fef 100755 --- a/docker-entrypoint +++ b/docker-entrypoint @@ -26,8 +26,9 @@ if [ "$1" = 'autoheal' ] && [ -e ${DOCKER_SOCK} ]; then labelFilter=",\"label\":\[\"${AUTOHEAL_CONTAINER_LABEL:=autoheal}=true\"\]" fi + AUTOHEAL_START_PERIOD=${AUTOHEAL_START_PERIOD:=0} echo "Monitoring containers for unhealthy status in ${AUTOHEAL_START_PERIOD} second(s)" - sleep ${AUTOHEAL_START_PERIOD:=0} + sleep ${AUTOHEAL_START_PERIOD} while true; do sleep ${AUTOHEAL_INTERVAL:=5} From d1a2e17253afae04c6e21ff2bc639ec4020d652c Mon Sep 17 00:00:00 2001 From: Rishi Date: Wed, 23 Jan 2019 22:46:05 +0530 Subject: [PATCH 2/2] Exit if right most command fails in pipe --- docker-entrypoint | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-entrypoint b/docker-entrypoint index 91498d0..9f587c9 100755 --- a/docker-entrypoint +++ b/docker-entrypoint @@ -1,5 +1,7 @@ #!/usr/bin/env sh + set -e +set -o pipefail DOCKER_SOCK=${DOCKER_SOCK:-/var/run/docker.sock} CURL_TIMEOUT=${CURL_TIMEOUT:-30}