So, 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.
Unbound is an international nonprofit based in Kansas City, Kansas, and founded by lay Catholics grounded in the Gospel call to put the needs of the marginalized and vulnerable first
I wanted to add it to BigBearCasaOS, but there was no official Docker image available. So I added it to ‘big-bear-docker-images’ repository to store all of the Docker images that we create and maintain for BigBearCommunity.
** Port 53 **
If your port 53 is being used by systemd-resolved, then you can stop and disable it with this script:
bash -c "$(wget -qLO - https://raw.githubusercontent.com/bigbeartechworld/big-bear-scripts/master/disable-dns-service/disable_dns_service.sh)"
Docker Compose
version: "3"
services:
pihole-unbound:
container_name: pihole-unbound # Sets a custom container name.
image: bigbeartechworld/big-bear-pihole-unbound:2024.02.2 # Specifies the Docker image to use.
ports:
- "53:53/tcp" # Binds TCP port 53 on the host to TCP port 53 in the container, used for DNS.
- "53:53/udp" # Binds UDP port 53 on the host to UDP port 53 in the container, also used for DNS.
- "67:67/udp" # Binds UDP port 67 on the host to UDP port 67 in the container, used for DHCP.
- "80:80/tcp" # Binds TCP port 80 on the host to TCP port 80 in the container, used for the web interface.
- "443:443/tcp" # Binds TCP port 443 on the host to TCP port 443 in the container, used for HTTPS.
- "5353:5353/udp" # Binds UDP port 5353 on the host to UDP port 5353 in the container, used for Unbound.
environment:
TZ: "America/Chicago" # Sets the timezone for the container.
WEBPASSWORD: "your_password" # Sets the password for the web interface.
DNS1: "127.0.0.1#5353" # Configures the primary DNS to be Unbound running within the container.
DNS2: "no" # Disables secondary DNS.
volumes:
- pihole_data:/etc/pihole/ # Mounts the volume for Pi-hole data to persist configurations.
- dnsmasq_data:/etc/dnsmasq.d/ # Mounts the volume for dnsmasq data to persist configurations.
restart: unless-stopped # Ensures the container restarts unless it is explicitly stopped.
volumes:
pihole_data:
driver: local # Sets the driver for pihole_data volume to local storage.
dnsmasq_data:
driver: local # Sets the driver for dnsmasq_data volume to local storage.