Skip to content

Instantly share code, notes, and snippets.

@quells
Last active April 2, 2021 23:23
Show Gist options
  • Save quells/73d968fcc566753bc6c1a4870ef53c9a to your computer and use it in GitHub Desktop.
Save quells/73d968fcc566753bc6c1a4870ef53c9a to your computer and use it in GitHub Desktop.
Pi-Hole + Unbound Docker Compose Script
version: "3"
networks:
dns_net:
driver: bridge
ipam:
config:
- subnet: 172.31.41.0/24
services:
pihole:
container_name: pihole
hostname: pihole.limwells.house
image: pihole/pihole:v5.7
networks:
dns_net:
ipv4_address: 172.31.41.59
dns:
- 127.0.0.1
ports:
- "53:53/tcp"
- "53:53/udp"
- "3142:80/tcp"
environment:
- "TZ=CHANGEME"
- "WEBPASSWORD=CHANGEME"
- "DNS1=172.31.41.60#53"
- "DNS2=no"
volumes:
- "./etc-pihole/:/etc/pihole/"
- "./etc-dnsmasq.d/:/etc/dnsmasq.d/"
restart: unless-stopped
depends_on:
- unbound
unbound:
container_name: unbound
image: mvance/unbound:1.12.0
networks:
dns_net:
ipv4_address: 172.31.41.60
volumes:
- "./unbound:/opt/unbound/etc/unbound"
ports:
- "5053:53/tcp"
- "5053:53/udp"
healthcheck:
disable: true
restart: unless-stopped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment