Install PiHole In Docker (2022)

Опубликовано: 17 Апрель 2026
на канале: Tech Syrup
1,406
8

Install PiHole In Docker (2022)

Commands Used:

docker pull pihole/pihole

sudo nano docker-compose.yml

docker-compose up --detach

sudo docker exec -it pihole bash

pihole -a -p

exit

Docker Compose File Used *

version: "3"

More info at https://github.com/pi-hole/docker-pi-... and https://docs.pi-hole.net/
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
"53:53/tcp"
"53:53/udp"
"67:67/udp"
"80:80/tcp"
environment:
TZ: 'America/Chicago'
WEBPASSWORD: 'set a secure password here or it will be random'
Volumes store your data between container upgrades
volumes:
'./etc-pihole/:/etc/pihole/'
'./etc-dnsmasq.d/:/etc/dnsmasq.d/'
Recommended but not required (DHCP needs NET_ADMIN)
https://github.com/pi-hole/docker-pi-...
cap_add:
NET_ADMIN
restart: unless-stopped