I have an Alpine (3.22) VM running Pihole (latest: 2025.06.2) as a docker container (docker compose 2.36.2-r0). My pihole server forwards local queries to a domain controller for mydomain.local. I can ping/nslookup my PC, domain controller, etc by their hostname and FQDN. I cannot successfully ping or nslookup the pihole VM (pihole1 or pihole.mydomain.local) or pi.hole.
I do notice the nslookup identifies my Pihole server as pi.hole, but cannot ping/nslookup that pi.hole name.
ping pihole1
Ping request could not find host pihole1. Please check the name and try again.
ping pi.hole
Ping request could not find host pi.hole. Please check the name and try again.
Additional info: I did find an old thread (Pihole not resolving it's own hostname - #9 by gniting) where this sort of behavior was resolved years ago by a bugfix. I've tried a few of the suggestions from that thread, and nothing seems to resolve the issue.
My mistake for genericizing with .local; my domain is not actually a ".local". I'll just use leave it as the actual domain (337.ninja) to keep it simple.
Your nslookup pi.hole results demonstrate that Pi-hole has been used for at least that specific DNS requests, and it has been processing and answering that request:
Your docker compose reveals that you haven't set an IP address, which explains 0.0.0.0 showing up as a result.
Please add the following two FTLCONF_* lines to your docker compose environment: section (additional lines below shown for context):
My VM gets its IP from DHCP, statically assigned to the MAC address from the router so I can manage all addressing in one place. I was expecting Pihole to read that as [current IP] instead of [no IP], but I understand how the expectation of a static IP would cause confusion. I would expect Pihole to hand out its own IP for pi.hole (which is not in my DNS server), but I am surprised it hands out its own IP for its hostname instead of handing that request off to the DNS server. It's now handing out the correct IP for pi,hole, pihole1, & pihole1.337.ninja. If the IP ever does change, I'll need to remember to update the compose.yaml. Might put that into the VM notes.
Thanks for getting me straightened out, @Bucking_Horn!