r/docker • u/Glass-Start-4419 • 9h ago
My containers have no DNS resolution
I'm using OpenMediaVault 7 (Debian 12) and I would have gone to OpenMediaVault for support first except that the subreddit has died and the forums constantly return 500 errors for me.
I have the docker compose plugin installed so I just make a compose file in the GUI and everything runs fine, except that my containers cannot resolve FQDNs. I have put the DNS flag in my containers:
dns:
- 8.8.8.8
My containers are not using the default bridge network but rather the bridge network that is created separately for each container with compose.
I can run
docker run --rm curlimages/curl:latest curl 1.1.1.1
And it returns a successful request. BUT if I run the same request with google.com instead of an IP, it fails to resolve, even if I add the --dns flag in the run command.
The /etc/resolv.conf internal to the container(s) says the nameserver is 127.0.0.11
The /etc/resolv.conf on the host machine says 127.0.0.53 is the nameserver.
Resolvectl says that the DNS server on enp3s0 is 8.8.8.8
I have set /etc/docker/daemon.json to have both 8.8.8.8 and 1.1.1.1 as nameservers.
I have set my DNS= in /etc/systemd/resolved.conf to 8.8.8.8.
The host has name resolution.
I just want to be able to run my game servers. Please help me, I am falling into insanity.