Skip to content

Instantly share code, notes, and snippets.

@OSCUK
Created March 21, 2022 15:24
Show Gist options
  • Save OSCUK/9af428ef9b1e4010efd504b4fc2f8cfa to your computer and use it in GitHub Desktop.
Save OSCUK/9af428ef9b1e4010efd504b4fc2f8cfa to your computer and use it in GitHub Desktop.
Pi-Hole on Docker
version: "3"
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
# For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
ports:
- "53:53/tcp"
- "53:53/udp"
- "1080:80/tcp"
environment:
TZ: 'Europe/London'
# WEBPASSWORD: 'R54F78ny4875yn485y487P'
# Volumes store your data between container upgrades
volumes:
- './etc-pihole:/etc/pihole'
- './etc-dnsmasq.d:/etc/dnsmasq.d'
# https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
cap_add:
restart: unless-stopped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment