Skip to content

Instantly share code, notes, and snippets.

@ILiedAboutCake
Created October 21, 2022 21:29
Show Gist options
  • Save ILiedAboutCake/95101b99a10628a0f8a86fa848e7aebb to your computer and use it in GitHub Desktop.
Save ILiedAboutCake/95101b99a10628a0f8a86fa848e7aebb to your computer and use it in GitHub Desktop.
PiHole + CloudFlare/Google DNS over HTTPS Docker Compose
version: "3.4"
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
- "53:53/tcp"
- "53:53/udp"
- "80:80/tcp"
- "443:443/tcp"
environment:
TZ: 'America/New_york'
WEBPASSWORD: 'changeme'
volumes:
- './data/etc:/etc/pihole/'
- './data/dnsmasq.d/:/etc/dnsmasq.d/'
restart: unless-stopped
networks:
- pihole
cloudflared-cf:
container_name: cloudflared-cf
image: cloudflare/cloudflared:latest
command: proxy-dns --address 0.0.0.0 --port 5353 --upstream https://1.1.1.1/dns-query --upstream https://1.0.0.1/dns-query
restart: unless-stopped
networks:
pihole:
ipv4_address: 172.20.1.1
cloudflared-goog:
container_name: cloudflared-goog
image: cloudflare/cloudflared:latest
command: proxy-dns --address 0.0.0.0 --port 5353 --upstream https://8.8.8.8/dns-query --upstream https://8.8.4.4/dns-query
restart: unless-stopped
networks:
pihole:
ipv4_address: 172.20.8.8
networks:
pihole:
ipam:
config:
- subnet: 172.20.0.0/16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment