From 7e805659ce8fe9669fcfab91ff53ea3d6e5d2312 Mon Sep 17 00:00:00 2001 From: Dimitri KOPRIWA Date: Thu, 12 Dec 2019 13:22:05 +0100 Subject: [PATCH] fix(dns): /etc/hosts was ignored by traefik Fix #6001 --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 873d55312d..f74b47d550 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,4 +3,6 @@ COPY script/ca-certificates.crt /etc/ssl/certs/ COPY dist/traefik / EXPOSE 80 VOLUME ["/tmp"] +## Fix nssswitch not looking at host file (See https://stackoverflow.com/questions/49476452/traefik-forwarding-to-a-host-and-overriding-ip?answertab=oldest#tab-top) +RUN echo "hosts: files dns" > /etc/nsswitch.conf ENTRYPOINT ["/traefik"]