diff --git a/Dockerfile b/Dockerfile index f06887e..c5295de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,8 @@ FROM nginx:alpine ENV HTPASSWD='foo:$apr1$odHl5EJN$KbxMfo86Qdve2FH4owePn.' \ FORWARD_PORT=80 \ - FORWARD_HOST=web + FORWARD_HOST=web \ + DNS_RESOLVER= WORKDIR /opt diff --git a/launch.sh b/launch.sh index f5aba9e..f1a9050 100755 --- a/launch.sh +++ b/launch.sh @@ -4,4 +4,8 @@ rm /etc/nginx/conf.d/default.conf || : envsubst < auth.conf > /etc/nginx/conf.d/auth.conf envsubst < auth.htpasswd > /etc/nginx/auth.htpasswd +if [ -n "${DNS_RESOLVER}" ]; then + echo "resolver ${DNS_RESOLVER};" >> /etc/nginx/conf.d/auth.conf +fi + nginx -g "daemon off;"