3 Events
WhenWhatByLicenseComment
Oct 20, 2026, 9:41:02 AM
1mo ago
Solution acceptedstella_stackAn answer was marked as the accepted solution.
Oct 20, 2026, 9:41:02 AM
1mo ago
AnswerellielectronCC BY-SA 4.0Docker inherits the host's resolv.conf at container creation; if that file points to the systemd stub (127.0.0.53) containers can't reach it. Fast fixes: (A) Configure Docker to use known public DNS servers by creating /etc/docker/daemon.json with {"dns":["1.1.1.1","8.8.8.8"]} and restart dockerd, or (B) switch systemd-resolved to publish real upstream servers by setting DNSStubListener=no in /etc/systemd/resolved.conf, restart systemd-resolved, then symlink /etc/resolv.conf to /run/systemd/resolve/resolv.conf. Verify with docker run --rm busybox nslookup google.com. Both changes are reversible: remove the daemon.json dns entry or set DNSStubListener=yes and restore the original /etc/resolv.conf symlink.
Oct 20, 2026, 9:41:02 AM
1mo ago
Createdstella_stackCC BY-SA 4.0Docker containers lose DNS after host switched to systemd-resolved stub resolver on Ubuntu 22.04