Files
unbound-docker/examples/pi-hole/docker-compose.yml
T
garlic-hub c25419b79a Simplify pihole example
Remove IP address configuration from network and let docker handle it
for us.
2024-10-24 21:50:00 -04:00

43 lines
972 B
YAML

volumes:
pihole:
dnsmasq:
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
- '53:53/tcp'
- '53:53/udp'
- '67:67/udp' # Required if you are using Pihole as your DHCP server
- '80:80/tcp'
networks:
- default
environment:
PIHOLE_DNS_: unbound
volumes:
- 'pihole:/etc/pihole'
- 'dnsmasq:/etc/dnsmasq.d'
cap_add:
- NET_ADMIN # Required if you are using Pi-hole as your DHCP server
restart: unless-stopped
unbound:
image: klutchell/unbound
networks:
- default
healthcheck:
# Use the drill wrapper binary to reduce the exit codes to 0 or 1 for healthchecks
test: ['CMD', 'drill-hc', '@127.0.0.1', 'dnssec.works']
interval: 30s
timeout: 30s
retries: 3
start_period: 30s
volumes:
- /path/to/config:/etc/unbound/custom.conf.d
restart: unless-stopped
networks:
default:
driver: bridge