From 065dd7f1ea51f9a908c26dca840ff0a3d6cba606 Mon Sep 17 00:00:00 2001 From: Teoh Han Hui Date: Mon, 6 Feb 2017 18:20:54 +0800 Subject: [PATCH] Fix build --- docker-entrypoint.sh | 1 + nginx.tmpl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index ed2e882..2afd5bf 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -22,6 +22,7 @@ fi export RESOLVERS=$(awk '$1 == "nameserver" {print $2}' ORS=' ' /etc/resolv.conf | sed 's/ *$//g') if [ "x$RESOLVERS" = "x" ]; then echo "Warning: unable to determine DNS resolvers for nginx" >&2 + unset RESOLVERS fi # If the user has run the default command and the socket doesn't exist, fail diff --git a/nginx.tmpl b/nginx.tmpl index 2ef7646..09a709c 100644 --- a/nginx.tmpl +++ b/nginx.tmpl @@ -58,7 +58,7 @@ log_format vhost '$host $remote_addr - $remote_user [$time_local] ' access_log off; -{{ if ne $.Env.RESOLVERS "" }} +{{ if $.Env.RESOLVERS }} resolver {{ $.Env.RESOLVERS }}; {{ end }}