devplayer0 / docker-net-dhcp

Docker network driver for networking on a host bridge with DHCP-allocated IP addresses
GNU General Public License v3.0
193 stars 55 forks source link

Issues with DNS in Docker w/ this module? #26

Open devzero opened 2 years ago

devzero commented 2 years ago

I have an odd issue. Using this container with --net=host works fine, but when I try to launch the plexinc/pms-docker image, it fails to start properly because no DNS is resolved in the container and the software breaks hard. It appears to have /etc/resolv.conf pointing to 127.0.0.11, which is Docker's built-in forward to it's DNS server, and if I watch the system logs for it, it appears to fail at setting up some iptables rules for forwarding that (see attached system logs excerpt). It may be of note that my host system uses nftables (nixos 21.11). If I pop into a shell in the container, I can't resolve any hostnames at all. It's not clear why this container would have this problem. It appears that it may be caused by my nixos config, that may be trying to lock down the systemd service running the container. I see a related issue with similar looking error. Is there a way to disable trying to use Docker's DNS forwarding and just directly configure DNS over the bridge?

Thanks

journald.logs.docker.issue.txt