Added docker-compose and notes for pi-hole

This commit is contained in:
Michele Cereda
2022-05-11 22:42:53 +02:00
parent 72a54132a3
commit 60df86b2d5
3 changed files with 72 additions and 0 deletions

14
docker/pi-hole/README.md Normal file
View File

@@ -0,0 +1,14 @@
# Pi-hole
## Further readings
- [Github]
- [Documentation]
## Sources
- [Docker Hub]
[docker hub]: https://hub.docker.com/r/pihole/pihole
[documentation]: https://docs.pi-hole.net/
[github]: https://github.com/pi-hole/docker-pi-hole/

View File

@@ -0,0 +1,30 @@
version: "3.2"
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
- "53:53/tcp"
- "53:53/udp"
- "67:67/udp"
- "80:80/tcp"
- "443:443/tcp"
environment:
TZ: Europe/Amsterdam
WEBPASSWORD_FILE: /run/secrets/webpassword
volumes:
- ./etc-pihole/:/etc/pihole/
- ./etc-dnsmasq.d/:/etc/dnsmasq.d/
dns:
- 127.0.0.1
- 1.1.1.1
cap_add:
- NET_ADMIN
restart: unless-stopped
secrets:
- webpassword
secrets:
webpassword:
file: ./webpassword

View File

@@ -0,0 +1,28 @@
version: "3"
# 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
ports:
- "53:53/tcp"
- "53:53/udp"
- "67:67/udp"
- "80:80/tcp"
- "443:443/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/'
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