Bugzilla – Bug 1214443
Docker configures Google instead of hosts IPv6 nameservers
Last modified: 2024-03-04 18:17:15 UTC
Hi, if a host is configured with IPv4 nameservers in its /etc/resolv.conf, these entries are applied to the containers /etc/resolv.conf as expected: ``` host # grep ^name /etc/resolv.conf nameserver 10.160.0.1 host # docker run --rm -it opensuse/leap:latest 364728f6206a:/ # grep ^name /etc/resolv.conf nameserver 10.160.0.1 ``` However, if the host is configured with IPv6 nameservers, Docker applies Google nameservers instead: ``` host # grep ^name /etc/resolv.conf nameserver 2a07:de40:b205:7:10:144:53:53 nameserver 2a07:de40:b205:7:10:144:53:54 host # docker run --rm -it opensuse/leap:latest 08de5e58e3bb:/ # grep ^name /etc/resolv.conf nameserver 8.8.8.8 nameserver 8.8.4.4 ``` The upstream documentation (https://docs.docker.com/network/#dns-services) suggests that this is a fallback mechanism, however the IPv6 nameservers configured on the host are perfectly operational, and even resolve external/internet queries: ``` host # dig @2a07:de40:b205:7:10:144:53:53 opensuse.org +short 195.135.221.140 host # dig @2a07:de40:b205:7:10:144:53:53 opensuse.org +short AAAA 2001:67c:2178:8::16 host # dig @2a07:de40:b205:7:10:144:53:54 opensuse.org +short 195.135.221.140 host # dig @2a07:de40:b205:7:10:144:53:54 opensuse.org +short AAAA 2001:67c:2178:8::16 ``` The Docker installation is a stock one without any configuration changes: ``` host # grep PRETTY /etc/os-release PRETTY_NAME="SUSE Linux Enterprise Server 15 SP5" host # zypper se -ivx docker S | Name | Type | Version | Arch | Repository ---+--------+---------+------------------------+--------+----------------------------- i+ | docker | package | 23.0.6_ce-150000.178.1 | x86_64 | SLE-Module-Containers-Update ``` Best, Georg
I am running into this as well today. Is there a workaround available?
workaround: use podman