moby / libnetwork

networking for containers
Apache License 2.0
2.16k stars 880 forks source link

Docker custom networks only respect first `--dns` flag in `docker run` #1287

Open srstsavage opened 8 years ago

srstsavage commented 8 years ago

Using Docker 1.11.2. These docs:

https://docs.docker.com/engine/userguide/networking/configure-dns/

indicate that the internal DNS server on a custom network should respect --dns flags when running docker run and use those as external DNS servers when the internal DNS can't resolve a host.

However, it appears that only the first --dns flag is respected. Passing two results in the second --dns being ignored, and reversing the order of the --dns flags causes reversed results.

Please see this gist for code to reliably replicate this behavior (I can inline this script if preferred):

https://gist.github.com/shane-axiom/9773e9fbaf6496f7dbe30168388ee328

GordonTheTurtle commented 7 years ago

@shane-axiom It has been detected that this issue has not received any activity in over 6 months. Can you please let us know if it is still relevant:

Thank you! This issue will be automatically closed in 1 week unless it is commented on. For more information please refer to https://github.com/docker/libnetwork/issues/1926

srstsavage commented 7 years ago

Yes, this issue is still relevant. I just tested again against docker 17.05.0-ce and updated the gist demonstrating the issue:

https://gist.github.com/shane-axiom/9773e9fbaf6496f7dbe30168388ee328

stefan-wegener commented 6 years ago

Is there still something happening regarding this issue? For me Docker 18.05 is still facing the above problems. Btw, I think the issue is related to: https://github.com/docker/libnetwork/issues/1664