Bug 1214443 - Docker configures Google instead of hosts IPv6 nameservers
Summary: Docker configures Google instead of hosts IPv6 nameservers
Status: NEW
Alias: None
Product: PUBLIC SUSE Linux Enterprise Server 15 SP5
Classification: openSUSE
Component: Containers (show other bugs)
Version: unspecified
Hardware: Other SLES 15
: P5 - None : Normal
Target Milestone: ---
Assignee: Containers Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-21 16:23 UTC by Georg Pfuetzenreuter
Modified: 2024-03-04 18:17 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Georg Pfuetzenreuter 2023-08-21 16:23:18 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
Comment 1 Enno Gotthold 2024-02-20 15:50:23 UTC
I am running into this as well today. Is there a workaround available?
Comment 2 Marcus Rückert 2024-03-04 18:17:15 UTC
workaround: use podman