Pi-hole is a Linux network-level advertisement and Internet tracker blocking application which acts as a DNS sinkhole (and optionally a DHCP server), intended for use on a private network. It is designed for use on embedded devices with network capability, such as the Raspberry Pi, but it can be used on other machines running Linux and cloud implementations.
Pi-hole has the ability to block traditional website advertisements as well as advertisements in unconventional places, such as smart TVs and mobile operating system advertisements.
All google results on how to set up Pi-hole using docker assume you have access to the router, that is, it’s not locked by the ISP and you don’t share an IP with other ISP customers. I managed to get the setup just right with the below. This works on Manjaro Linux.
docker run -d \
–name pihole \
-p 53:53/tcp -p 53:53/udp \
-p 80:80 \
-p 443:443 \
-e TZ=”America/New_York” \
-e WEBPASSWORD=Nairobi567 \
-e SERVERIP=192.168.XX.XX \
-v /mnt/sdb1/docker/pihole:/etc/pihole \
-v /mnt/sdb1/docker/pihole/dnsmasq:/etc/dnsmasq.d \
–dns=127.0.0.1 –dns=188.8.131.52 \
You can change the password to whatever you like. The server IP is the IP address of the host machine. Once the container has started you can test with your phone(android) by changing the the WI-FI DNS to the serverip.