Support hostnames and domains in PIHOLE_DNS_

This is a follow up to Start: Support hostnames and domains in PIHOLE_DNS_ by networkException · Pull Request #816 · pi-hole/docker-pi-hole · GitHub #docker

Currently the docker configuration does not allow for a hostname or domain in the pihole dns configuration. Technically DNS servers are never domains but in some cases the ip of a domain might want to be used as the DNS server. In particular a docker-compose stack would benefit from this feature:

services:
    pihole:
        image: pihole/pihole
        hostname: pihole        
        depends_on:
            - dnscrypt        
        ports:
            - 53:53/udp
        environment:
            PIHOLE_DNS_: dnscrypt

    dnscrypt:
        image: #...

By resolving the ip of "dnscrypt" on startup, pihole could now use the dnscrypt container as a DNS server.

@PromoFaux Could you check this out?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.

There is an upstream PR to dnsmasq which would implement this feature

1 Like

This has been part of

and is released with

Sorry, I never saw this tag/topic!

However, this has actually been a part of the docker image since around March of this year:

Though maybe with this new code in FTL/dnsmasq, we can change that up a little

Edit:

Ah, yes, @networkException is aware - from the linked PR:

Thanks a lot for implementing this! I can finally decomission my patched start.sh then :sweat_smile: