With the default network mode (bridge), the container has itscontainers have their network namespace isolated from that of the host, meaning the loopback address does not have the same meaning in the context of theone container andas it does in the context of the host.
You should point pihole to one of the IP addresses used by the host system, such as the IP address on the physical NIC, of or the IP address on the bridge created for your Docker network.
For more information about Docker networking: