You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I'm running Ubuntu 19.04 which has systemd-resolved enabled by default in mode one. The systemd-resolved manual states that traditional linux programs should use /etc/resolv.conf. Currently because of commit e353e7e however it will use /run/systemd/resolve/resolv.conf when systemd-resolved is running.
/ETC/RESOLV.CONF
Four modes of handling /etc/resolv.conf (see resolv.conf(5)) are supported:
• systemd-resolved maintains the /run/systemd/resolve/stub-resolv.conf file for
compatibility with traditional Linux programs. This file may be symlinked from
/etc/resolv.conf. This file lists the 127.0.0.53 DNS stub (see above) as the only
DNS server. It also contains a list of search domains that are in use by
systemd-resolved. The list of search domains is always kept up-to-date. Note that
/run/systemd/resolve/stub-resolv.conf should not be used directly by applications,
but only through a symlink from /etc/resolv.conf. This file may be symlinked from
/etc/resolv.conf in order to connect all local clients that bypass local DNS APIs
to systemd-resolved with correct search domains settings. This mode of operation is
recommended.
• A static file /usr/lib/systemd/resolv.conf is provided that lists the 127.0.0.53
DNS stub (see above) as only DNS server. This file may be symlinked from
/etc/resolv.conf in order to connect all local clients that bypass local DNS APIs
to systemd-resolved. This file does not contain any search domains.
• systemd-resolved maintains the /run/systemd/resolve/resolv.conf file for
compatibility with traditional Linux programs. This file may be symlinked from
/etc/resolv.conf and is always kept up-to-date, containing information about all
known DNS servers. Note the file format's limitations: it does not know a concept
of per-interface DNS servers and hence only contains system-wide DNS server
definitions. Note that /run/systemd/resolve/resolv.conf should not be used directly
by applications, but only through a symlink from /etc/resolv.conf. If this mode of
operation is used local clients that bypass any local DNS API will also bypass
systemd-resolved and will talk directly to the known DNS servers.
• Alternatively, /etc/resolv.conf may be managed by other packages, in which case
systemd-resolved will read it for DNS configuration data. In this mode of operation
systemd-resolved is consumer rather than provider of this configuration file.
Note that the selected mode of operation for this file is detected fully automatically,
depending on whether /etc/resolv.conf is a symlink to /run/systemd/resolve/resolv.conf
or lists 127.0.0.53 as DNS server.
Describe the results you received: /run/systemd/resolve/stub-resolv.conf is used.
Describe the results you expected:
I would expect that /etc/resolv.conf is used.
Thanks for reporting; this is indeed something that needs a solution (but there's some complications); there is an existing issue about that #38243 (also see the discussion on moby/libnetwork#2385 (comment))
let me close this one as duplicate of #38243 to prevent the discussion from diverging
Description
I'm running Ubuntu 19.04 which has systemd-resolved enabled by default in mode one. The systemd-resolved manual states that traditional linux programs should use
/etc/resolv.conf
. Currently because of commit e353e7e however it will use/run/systemd/resolve/resolv.conf
when systemd-resolved is running.Describe the results you received:
/run/systemd/resolve/stub-resolv.conf
is used.Describe the results you expected:
I would expect that
/etc/resolv.conf
is used.Output of
docker version
:Output of
docker info
:The text was updated successfully, but these errors were encountered: