Skip to content

Instantly share code, notes, and snippets.

@derekslenk
Last active May 9, 2019 00:09
Show Gist options
  • Save derekslenk/352d90cc81682ad3e13fdc53798b8fd9 to your computer and use it in GitHub Desktop.
Save derekslenk/352d90cc81682ad3e13fdc53798b8fd9 to your computer and use it in GitHub Desktop.
For setting up pihole and cloudflared for DNS over HTTPs
version: '2'
# More info for pihole: https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
# More info for cloudflared: https://hub.docker.com/r/visibilityspots/cloudflared/ and https://docs.pi-hole.net/guides/dns-over-https/
services:
cloudflared:
container_name: "cloudflared"
image: visibilityspots/cloudflared:amd64
network_mode: "host"
pihole:
container_name: "pihole"
depends_on:
- cloudflared
image: pihole/pihole:latest
network_mode: "host"
environment:
TZ: 'America/Detroit'
DNS1: 192.168.1.12#5054 #IP of the docker host
DNS2: 192.168.1.12#5054 #IP of the docker host
ServerIP: 192.168.1.12 #IP of the docker host
ServerIPv6: fe80::20c:29ff:fe12:aa4c #IPv6 of the docker host
WEBPASSWORD: changeme #Change or set to "" to get rid of
DNSMASQ_LISTENING: all #not entirely sure if needed
# Volumes store your data between container upgrades
volumes:
- '/host/path/etc-pihole/:/etc/pihole/'
- '/host/path/etc-dnsmasq.d/:/etc/dnsmasq.d/'
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