0

NextDNS for Docker containers

Hello Forum!

What is the best way to make all Docker containers, running on a Linux host, use NextDNS service?

It would be preferred to only have all the docker containers use NextDNS, the host DNS should remain as it is without using NextDNS.

Is this somehow possible?

Thanks in advance!

Best Regards

1 reply

null
    • Mike_V
    • 2 days ago
    • Reported - view

    By default, containers inherit the DNS settings as defined in the /etc/resolv.conf configuration file. Containers that attach to the default bridge network receive a copy of this file. Containers that attach to a custom network use Docker's embedded DNS server. The embedded DNS server forwards external DNS lookups to the DNS servers configured on the host.

    Source: https://docs.docker.com/engine/network/#dns-services

    So it sounds like there's nothing you need to do other than ensure that whatever is in the resolv.conf of your host system will point to NextDNS CLI, DNSCrypt, systemd-resolved, or some other resolver service that can forward the query on to NextDNS using DoH and/or DoT.

Content aside

  • 2 days agoLast active
  • 1Replies
  • 33Views
  • 2 Following