From e21f8248b64528b9a30a87331074a0eae6676225 Mon Sep 17 00:00:00 2001 From: Alexandre ABRIOUX Date: Wed, 8 Dec 2021 20:31:00 +0100 Subject: [PATCH] fix: being able to use empty DNS_ADDRS with docker image --- docker/alpine/entrypoint.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/alpine/entrypoint.sh b/docker/alpine/entrypoint.sh index c3655efe..84b7104e 100755 --- a/docker/alpine/entrypoint.sh +++ b/docker/alpine/entrypoint.sh @@ -8,12 +8,15 @@ if [[ -f "/var/run/secrets/$PASSWORD_SECRET" ]]; then PASSWORD=$(cat "/var/run/secrets/$PASSWORD_SECRET") fi +if [[ ! -z "$DNS_ADDRS" ]]; then + ARGS="-d $DNS_ADDRS $ARGS" +fi + exec ss-server \ -s $SERVER_ADDR \ -p $SERVER_PORT \ -k ${PASSWORD:-$(hostname)} \ -m $METHOD \ -t $TIMEOUT \ - -d $DNS_ADDRS \ -u \ $ARGS