mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
Updated pi-hole to run on Raspberry Pi
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
# Pi-hole
|
||||
|
||||
## TL;DR
|
||||
|
||||
```sh
|
||||
# Run on Raspberry Pi.
|
||||
sudo apt update && sudo apt install -y docker-compose
|
||||
cd pi-hole && sudo docker-compose up -d
|
||||
```
|
||||
|
||||
## Further readings
|
||||
|
||||
- [Github]
|
||||
|
||||
@@ -1,30 +1,36 @@
|
||||
version: "3.2"
|
||||
|
||||
secrets:
|
||||
webpassword:
|
||||
file: ./webpassword
|
||||
|
||||
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
|
||||
# DNSMASQ_LISTENING: all # Only required if using Docker's default 'bridge' network setting
|
||||
volumes:
|
||||
- ./etc-pihole/:/etc/pihole/
|
||||
- ./etc-dnsmasq.d/:/etc/dnsmasq.d/
|
||||
- ./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
|
||||
# If using the container's DHCP server it is recommended to replace the
|
||||
# 'ports' definition with the 'network_mode' definition instead.
|
||||
network_mode: "host"
|
||||
# ports:
|
||||
# - "53:53/tcp"
|
||||
# - "53:53/udp"
|
||||
# - "67:67/udp" # Only required if using the DHCP server component.
|
||||
# - "80:80/tcp"
|
||||
|
||||
# Only required if using the DHCP server component.
|
||||
# cap_add:
|
||||
# - NET_ADMIN
|
||||
|
||||
@@ -5,24 +5,20 @@ 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"
|
||||
- "67:67/udp" # Only required if you are using Pi-hole as your DHCP server
|
||||
- "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)
|
||||
- './etc-pihole:/etc/pihole'
|
||||
- './etc-dnsmasq.d:/etc/dnsmasq.d'
|
||||
# https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
- NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed
|
||||
restart: unless-stopped
|
||||
|
||||
Reference in New Issue
Block a user