-
-
Save dnburgess/5caf8ff10f65bdc2467d532f55753774 to your computer and use it in GitHub Desktop.
--- | |
version: 2 | |
services: | |
pihole: | |
container_name: pihole | |
image: pihole/pihole:latest | |
ports: | |
- 53:53/tcp #DNS Port | |
- 53:53/udp #DNS Port | |
#- 67:67/udp #DHCP Port | |
- 83:80/tcp #Dashboard Port | |
#- 443:443/tcp #Port 443 is to provide a sinkhole for ads that use SSL. | |
environment: | |
TZ: America/Denver | |
WEBPASSWORD: password | |
DNS1: 1.1.1.1 | |
DNS2: 1.0.0.1 | |
DNSSEC: 'true' | |
volumes: | |
- /srv/dev-disk-by-label-Files/Config/Pihole/etc-pihole/:/etc/pihole/ | |
- /srv/dev-disk-by-label-Files/Config/Pihole/etc-dnsmasq.d/:/etc/dnsmasq.d/ | |
cap_add: | |
- NET_ADMIN | |
restart: unless-stopped | |
This won't work out of the box as Raspbian has port 53 being used. We need to stop and reconfigure the service using it. | |
To stop systemd-resolved, run this command: | |
sudo systemctl stop systemd-resolved | |
To edit systemd-resolved, run this command: | |
sudo nano /etc/systemd/resolved.conf | |
Edit the file so it looks like this: | |
[Resolve] | |
DNS=1.1.1.1 | |
FallbackDNS=1.0.0.1 | |
#Domains= | |
#LLMNR=yes | |
#MulticastDNS=yes | |
#DNSSEC=allow-downgrade | |
#DNSOverTLS=no | |
#Cache=yes | |
#DNSStubListener=yes | |
#ReadEtcHosts=yes | |
DNSStubListener=no | |
Save and exit. | |
To create a symlink of the changes you made, run this command: | |
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf | |
Hi, Looks like your updated version doesn't work. I get YAML marshaling error. Not an expert with YAML (rookie here :-) ), but could it be the layout that is too flat compared to your v2 of the YAML script ?
thnx
Ralph
I just copied and pasted, you can go ahead and format it correctly if you want, I dont think I have it anymore as I went for a pihole+unbound container.
For anyone looking, here is a revised and fixed version 3:
version: "3"
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
- "53:53/tcp"
- "53:53/udp"
- "83:80/tcp"
environment:
TZ: 'America/Chicago'
# WEBPASSWORD: 'password'
volumes:
- /srv/dev-disk-by-label-Files/Config/Pihole/etc-pihole/:/etc/pihole/
- /srv/dev-disk-by-label-Files/Config/Pihole/etc-dnsmasq.d/:/etc/dnsmasq.d/
cap_add:
- NET_ADMIN
restart: unless-stopped
Hi, Looks like your updated version doesn't work. I get YAML marshaling error. Not an expert with YAML (rookie here :-) ), but could it be the layout that is too flat compared to your v2 of the YAML script ?
thnx
Ralph