Skip to content

Instantly share code, notes, and snippets.

@ivanmal
Last active May 2, 2021 23:36
Show Gist options
  • Save ivanmal/c0fa7724e1e503c41a6de4dbb1d5e90e to your computer and use it in GitHub Desktop.
Save ivanmal/c0fa7724e1e503c41a6de4dbb1d5e90e to your computer and use it in GitHub Desktop.
PI-Hole and DNS-Over-HTTPS on docker
version: "3" version: "3"
# Thanks to https://visibilityspots.org/dockerized-cloudflared-pi-hole.html
services:
cloudflared:
container_name: cloudflared
image: visibilityspots/cloudflared
restart: unless-stopped
networks:
pihole_net:
ipv4_address: 10.0.0.2
pihole:
container_name: TLSpihole
image: pihole/pihole:latest
ports:
- "53:53/tcp"
- "53:53/udp"
- "80:80/tcp"
environment:
TZ: 'America/Sao_Paulo'
WEBPASSWORD: 'pihole'
ServerIP: 10.0.0.3
DNS1: '10.0.0.2#5054'
DNS2: ''
IPv6: 'false'
volumes:
- './pihole/etc-pihole/:/etc/pihole/'
- './pihole/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
networks:
pihole_net:
ipv4_address: 10.0.0.3
networks:
pihole_net:
driver: bridge
ipam:
config:
- subnet: 10.0.0.0/29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment