traefik-library-image
traefik-library-image copied to clipboard
fix(dns): /etc/hosts was ignored by traefik
Fix https://github.com/containous/traefik/issues/6001
What does this PR do?
It create the missing /etc/nsswitch.conf.
Motivation
During proxying, traefik is performing a DNS resolution. This DNS resolution is skipping /etc/hosts file. This can cause unwanted DNS resolution, especially when using hostname as fqdn in marathon.
If you use /etc/hosts file for some resolution, this will fix it. If you use a real fqdn in marathon on a private network, you will still have to properly configure DNS serveur in traefik host.
Related to #42
I am curious, if this was already merged, why was it removed?
No clue why travis get this:
---> Running in d7c16a0f1158
OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory": unknown
The command "./.ci/test.sh" exited with 1.
What command are required in the alpine image ? It seems they already have /etc/resolv.conf since you import them from another image.
Thanks for providing all the details, I've updated the PR with requested change.
Side question: what is the status of this feature request for the Windows Docker images?
Hi @kopax , can you ensure that you're setting the parent image to 2.1.1-alpine please? You can check the Travis-CI build logs, or run the command by yourself to reproduce the error on your local change.
Hi @dduportal too much time have passed since the https://github.com/containous/traefik/pull/6012 and I lost track of what is needed. What about the alpine image? Was this never fixed in recent traefik version? I am still running on 2.1.1 with this fix but perhaps it's time to close this?
Hi @kopax , I am not involved anymore in the Traefik project. I would delegate to @ldez and @SantoDE to take care of your request instead :)