Skip to content

Instantly share code, notes, and snippets.

@f-bader
Created October 13, 2024 18:12
Show Gist options
  • Save f-bader/83da03527adb2562afb9f44927b7f454 to your computer and use it in GitHub Desktop.
Save f-bader/83da03527adb2562afb9f44927b7f454 to your computer and use it in GitHub Desktop.
Tailscale + Pihole completely containerized with docker compose
services:
tailscale-pihole:
image: tailscale/tailscale
container_name: tailscale
hostname: tailscale-pihole
restart: unless-stopped
environment:
- TS_STATE_DIR=/var/lib/tailscale
- TS_AUTHKEY=tskey-auth-
cap_add:
- net_admin
- sys_module
volumes:
- tailscale-data-pihole:/var/lib/tailscale
- /dev/net/tun:/dev/net/tun
pihole:
image: pihole/pihole:latest
container_name: pihole
restart: unless-stopped
environment:
TZ: Europe/Berlin
WEBPASSWORD: "Password"
DNSMASQ_LISTENING: all
network_mode: service:tailscale-pihole
volumes:
- pihole-data:/etc/pihole
- ./custom_data/joined_customrecords.dnsmasq:/etc/dnsmasq.d/00-additional.conf
volumes:
tailscale-data-pihole:
driver: local
pihole-data:
driver: local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment