From 60df86b2d54e1f6d1ff38a242bccb66024227a48 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Wed, 11 May 2022 22:42:53 +0200 Subject: [PATCH] Added docker-compose and notes for pi-hole --- docker/pi-hole/README.md | 14 ++++++++++ docker/pi-hole/docker-compose.yml | 30 ++++++++++++++++++++++ docker/pi-hole/upstream.docker-compose.yml | 28 ++++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 docker/pi-hole/README.md create mode 100644 docker/pi-hole/docker-compose.yml create mode 100644 docker/pi-hole/upstream.docker-compose.yml diff --git a/docker/pi-hole/README.md b/docker/pi-hole/README.md new file mode 100644 index 0000000..4ad76d3 --- /dev/null +++ b/docker/pi-hole/README.md @@ -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/ diff --git a/docker/pi-hole/docker-compose.yml b/docker/pi-hole/docker-compose.yml new file mode 100644 index 0000000..195fe20 --- /dev/null +++ b/docker/pi-hole/docker-compose.yml @@ -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 diff --git a/docker/pi-hole/upstream.docker-compose.yml b/docker/pi-hole/upstream.docker-compose.yml new file mode 100644 index 0000000..47073e9 --- /dev/null +++ b/docker/pi-hole/upstream.docker-compose.yml @@ -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