Docker custom networks only respect first `--dns` flag in `docker run`
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.2k
- Forks
- 875
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the reproduction linked in the issue with docker run and two --dns flags, then trace the custom-network DNS forwarding path in libnetwork. Done means both configured DNS servers are retained and used in the expected order when the internal resolver cannot resolve a host.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100