-
Notifications
You must be signed in to change notification settings - Fork 424
[18.09 backport] Fix: network=host using wrong resolv.conf with systemd-resolved #180
[18.09 backport] Fix: network=host using wrong resolv.conf with systemd-resolved #180
Conversation
When running a container in the host's network namespace, the container gets a copy of the host's resolv.conf (copied to `/etc/resolv.conf` inside the container). The current code always used the default (`/etc/resolv.conf`) path on the host, irregardless if `systemd-resolved` was used or not. This patch uses the correct file if `systemd-resolved` was detected to be running. Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 8364d1c) Signed-off-by: Sebastiaan van Stijn <[email protected]>
ping @tiborvass @euanh PTAL |
I
|
relates to moby#37485 |
This fix did break my configuration.
Usually inside the container it would write on /etc/resolv.conf Now it overwrites and writes 127.0.0.11 after the update to docker 18.09.5 I am running on Debian 9 Stretch without systemd-resolved Edit: I should note that this happened because on the affected containers they aren't using the default bridge network, if I check a container using the bridge network it is working fine. |
That's the expected behavior; |
is this also available on windows platform now? |
Windows doesn't use systemd-resolvd, so this doesn't really apply there |
Is there windows equivalent for docker ee engine :18.06 |
No full equivalent afaik |
nevermind, my bad! |
backport of moby#38579 for 18.09
When running a container in the host's network namespace, the container
gets a copy of the host's resolv.conf (copied to
/etc/resolv.conf
insidethe container).
The current code always used the default (
/etc/resolv.conf
) path on thehost, irregardless if
systemd-resolved
was used or not.This patch uses the correct file if
systemd-resolved
was detectedto be running.