Pi-hole Docker Compose - Proxmox Container
Pi-hole is a DNS sinkhole that protects your devices from unwanted content without installing any client-side sofware.
Pihole Docker Compose file:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 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
# - 67:67/udp # Only required if you are using Pi-hole as your DHCP server
- 80:80/tcp
dns:
- 127.0.0.1
- 1.1.1.1
environment:
TZ: America/Chicago
WEBPASSWORD: "password"
# Volumes store your data between container upgrades
volumes:
- ./etc-pihole:/etc/pihole
- ./etc-dnsmasq.d:/etc/dnsmasq.d
restart: unless-stopped
Issues:
If you get the following error:
1
Error response from daemon: driver failed programming external connectivity on endpoint pihole2 (0b296ab0cd4b81bffd1b4ea3c10888e81a387fd4b8a8433aa613208375adc435): Error starting userland proxy: listen tcp4 0.0.0.0:53: bind: address already in use
Run the following commands:
1
2
sudo systemctl disable systemd-resolved.service
sudo systemctl stop systemd-resolved
This post is licensed under
CC BY 4.0
by the author.