Skip to content

Instantly share code, notes, and snippets.

@neofob
Last active August 28, 2020 05:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neofob/72be8f8a154230ad0ba61a1b57d44ea4 to your computer and use it in GitHub Desktop.
Save neofob/72be8f8a154230ad0ba61a1b57d44ea4 to your computer and use it in GitHub Desktop.
pihole docker-compose
---
version: "3"
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
pihole:
container_name: pihole
hostname: pihole
image: pihole/pihole:latest
# Reserve 80 and 443 for other services
ports:
- "53:53/tcp"
- "53:53/udp"
- "67:67/udp"
- "8080:80/tcp"
- "1443:443/tcp"
environment:
TZ: 'UTC'
WEBPASSWORD: 'ChangeMe'
# Volumes store your data between container upgrades
volumes:
- './etc-pihole/:/etc/pihole/'
- './etc-dnsmasq.d/:/etc/dnsmasq.d/'
# Change host's /etc/resolv.conf to use 127.0.0.1
# systemctl disable systemd-resolved.service
dns:
- 127.0.0.1
- 1.1.1.1
# Recommended but not required (DHCP needs NET_ADMIN)
# https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
cap_add:
- NET_ADMIN
restart: unless-stopped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment