-
Notifications
You must be signed in to change notification settings - Fork 882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DNS broken out-of-the-box on Ubuntu Artful #2068
Comments
I suspect the name server is not correctly reflected in the host's
Can you check why the Ubuntu host's |
This also applies to BIONIC BEAVER |
Probably related moby/moby#36153 If it's worth something, I posted in SO with updated information https://stackoverflow.com/questions/51105875/internet-connection-not-working-networkmanager-not-working-after-installing-dock |
TLDR: Please, devs, implement a flag for the daemon that replicates the user-defined network DNS behaviour in the default network. Put all the scary warnings about backward compatibility in the docs you like. :-)
Because in 17.10 Ubuntu moved from a NetworkManager spawned instance of In user-defined docker networks this is fine because the docker DNS proxy on In the default network this breaks. It was broke before when it was using But you could work around it with the
A flag for If you put a |
Suggested on related issue #2187 In my case, the /run/systemd/resolve/resolv.conf contains what I want docker to use in containers I spin up. If I could simply tell the daemon to treat that resolv.conf in the same way as it is currently treating /etc/resolv.conf I think it would solve the issue (and the need to do so is likely discoverable). This would provide a much more user-friendly experience. |
@j3p0uk this commit moby/moby#37485 addresses the systemd-resolved case |
To reproduce -
Install Ubuntu Artful or Bionic desktop with default settings, connect it to a network by plugging in a cable and letting NetworkManager do its magic. Block access to 8.8.8.8 and 8.8.4.4 because you are on a corporate network.
Install docker-ce from docker's stable deb repo. (17.12.0-ce)
Create a container:
docker run -it ubuntu bash
Observe that DNS is broken in the container:
apt update
I believe this is because Ubuntu uses systemd-networkd on the host by default, and /etc/resolv.conf lists only
.
Expected behaviour:
docker should work out of the box on ubuntu artful.
Not-quite-good-enough-workarounds:
sudo apt install dnsmasq; echo '{"dns": ["172.17.0.1"]}' > /etc/docker/daemon.json
This fixes default containers, but breaks default custom networks -
docker network create --driver bridge brokenDNS; docker run --network brokenDNS -it ubuntu bash
.The text was updated successfully, but these errors were encountered: