diff --git a/make/photon/db/docker-healthcheck.sh b/make/photon/db/docker-healthcheck.sh index a0c93c0f7..e43ea4929 100644 --- a/make/photon/db/docker-healthcheck.sh +++ b/make/photon/db/docker-healthcheck.sh @@ -1,7 +1,8 @@ #!/bin/bash set -eo pipefail -host="$(hostname -i || echo '127.0.0.1')" +h="$(hostname -i || echo '127.0.0.1')" +host="${h%%[[:space:]]*}" #remove the trailing space user="${POSTGRES_USER:-postgres}" db="${POSTGRES_DB:-$POSTGRES_USER}" export PGPASSWORD="${POSTGRES_PASSWORD:-}"