From 52ca7eda4d3956f9ec5398caaef14b2ea771c43b Mon Sep 17 00:00:00 2001 From: Chai Feng Date: Wed, 3 Oct 2018 15:43:44 +0800 Subject: [PATCH] allow DEBUG env in entrypoint --- docker-entrypoint.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 7b58ae6..f8bab27 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -1,6 +1,6 @@ #!/bin/bash set -euo pipefail - +[[ -n "${DEBUG:-}" ]] && set -x [[ 0 -eq "$#" ]] && set -- start ufw_docker_agent=ufw-docker-agent @@ -24,7 +24,6 @@ function ufw-update-service-instances() { docker ps -qf "label=com.docker.swarm.service.id=${id}" | while read name; do - echo "$id $name $port" ufw-update-rule-for-instance "${name}" "$port" done } @@ -35,7 +34,6 @@ function update-ufw-rules() { -e 's/="/ /' \ -e 's/"$//' | while read id port; do - echo "${id}=$port" ufw-update-service-instances "${id}" "${port}" done }