Run Pihole as a Rootless Container
Run Pihole as a Rootless Container
Introduction
pihole.container
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[Service]
Restart=always
[Container]
ContainerName=pihole
Image=docker.io/pihole/pihole:latest
Label="io.containers.autoupdate=registry"
Environment=TZ=America/Vancouver
Environment=SERVERIP=192.168.0.24
Environment=WEBPASSWORD=<ADD YOUR OWN PASSWORD>
PodmanArgs=--dns=127.0.0.1 --dns=8.8.8.8
Volume=pihole-etc.volume:/etc/pihole:Z
Volume=pihole-dnsmasq.volume:/etc/dnsmasq.d:Z
PublishPort=53:53/tcp
PublishPort=53:53/udp
PublishPort=80:80/tcp
[Install]
WantedBy=default.target
pihole-etc.volume and pihole-dnsmasq.volume
1
2
3
[Volume]
User=myee
Group=myee
Open these ports.
1
2
firewall-cmd --permanent --add-port=53/tcp --add-port=53/udp --add-service=http
firewall-cmd --reload
Start the service.
1
systemctl --user start pihole.service
This post is licensed under CC BY 4.0 by the author.