mirror of https://github.com/docker/docs.git
Internal DNS uses IPv6 upstream servers
Since 26.0.0, IPv6 nameservers in the host's /etc/resolv.conf file have been treated the same as IPv4 nameservers - the internal DNS server will use them as upstream servers, they won't be left in the container's resolv.conf. (So, there's no longer any race between the internal server and IPv6 upstream servers when using musl-libc.) Signed-off-by: Rob Murray <rob.murray@docker.com>
This commit is contained in:
parent
3417ae120e
commit
9dacd32d30
|
@ -174,22 +174,6 @@ configuration.
|
|||
| `--dns-opt` | A key-value pair representing a DNS option and its value. See your operating system's documentation for `resolv.conf` for valid options. |
|
||||
| `--hostname` | The hostname a container uses for itself. Defaults to the container's ID if not specified. |
|
||||
|
||||
### Nameservers with IPv6 addresses
|
||||
|
||||
If the `/etc/resolv.conf` file on the host system contains one or more
|
||||
nameserver entries with an IPv6 address, those nameserver entries get copied
|
||||
over to `/etc/resolv.conf` in containers that you run.
|
||||
|
||||
For containers using musl libc (in other words, Alpine Linux), this results in
|
||||
a race condition for hostname lookup. As a result, hostname resolution might
|
||||
sporadically fail if the external IPv6 DNS server wins the race condition
|
||||
against the embedded DNS server.
|
||||
|
||||
It's rare that the external DNS server is faster than the embedded one. But
|
||||
things like garbage collection, or large numbers of concurrent DNS requests,
|
||||
can sometimes result in a round trip to the external server being faster than local
|
||||
resolution.
|
||||
|
||||
### Custom hosts
|
||||
|
||||
Your container will have lines in `/etc/hosts` which define the hostname of the
|
||||
|
|
Loading…
Reference in New Issue