I need a little help. I’m trying to install PowerDNS in Docker on Ubuntu 24.04, so I need to “free up” Ubuntu’s port 53 usage. For this I edited /etc/systemd/resolved.conf file and set DNSStubListener=no. After this docker compose was unable to pull images. So I created /etc/docker/daemon.json file with this content:
{
“dns”: [“127.0.0.11”, “8.8.8.8”, “1.1.1.1”]
}
However this prevents Docker’s internal DNS to work with container names. Is there a better way to make Docker work again WITH container names, yet keep the host’s port 53 free for PowerDNS?
As far as I know, the DNS ip you set is used behind the the built-in DNS server and it is only for overriding the DNS
which is set on your host so Docker can have a different DNS server.
I don’t understand the title either, since you only disabled the stub listener. I haven’t checked the systemd documentation yet, but based on its name, in addition to disabling the listener, it should only relink /etc/resolv.conf ro the resolv.conf of systemd which contains the actual external DNS servers and not the loopback IP (stub resolver)..
Actually I should have not done any of this. I reverted every single change and it works, because it listens on different interface, so there is no conflict. At least this is how I understand.
Cheers!