Hallo, ich möchte gern pihole mit unbound in Docker laufen lassen. Dies ist meine docker-compose.yml:
version: '2'
volumes:
pihole:
dnsmasq:
services:
pihole:
image: pihole/pihole:latest
container_name: pihole
ports:
- "53:53/tcp"
- "53:53/udp"
- "67:67/udp" # Only required if you are using Pi-hole as your DHCP server
- "81:80/tcp"
cap_add:
- NET_ADMIN
environment:
WEBPASSWORD: ${WEBPASSWORD}
TZ: 'Europe/Berlin'
volumes:
- './etc-pihole:/etc/pihole'
- './etc-dnsmasq.d:/etc/dnsmasq.d'
dns:
- '127.0.0.1'
- '1.1.1.1'
network_mode: host
environment:
- 'DNS1=127.0.0.1#5053'
- 'DNS2=127.0.0.1#5053'
restart: unless-stopped
unbound:
image: klutchell/unbound:1.13.2
ports:
- '5053:5053/tcp'
- '5053:5053/udp'
restart: unless-stopped
Sobald ich network_mode: host
in der docker-compose habe, kann ich über ip-adresse:81
pihole nicht erreichen. Wenn ich den Eintrag entferne oder auskommentiere, kann ich pihole unter der Adresse ip-adresse:81
erreichen.
Woran liegt das?
Laut Internetz muss wohl bei network_mode
die ServerIP
separat eingetragen werden. Geht aber auch nicht, gleiches Problem. Sieht aktuell bei mir daher so aus:
version: '2'
volumes:
pihole:
dnsmasq:
services:
pihole:
image: pihole/pihole:latest
container_name: pihole
ports:
- "53:53/tcp"
- "53:53/udp"
- "67:67/udp" # Only required if you are using Pi-hole as your DHCP server
- "81:80/tcp"
cap_add:
- NET_ADMIN
environment:
ServerIP: '192.168.178.34'
WEBPASSWORD: ${WEBPASSWORD}
TZ: 'Europe/Berlin'
DNS1: 127.0.0.1#5335 # Hardcoded to our Unbound server
DNS2: 127.0.0.1#5335 # Hardcoded to our Unbound server
volumes:
- './etc-pihole:/etc/pihole'
- './etc-dnsmasq.d:/etc/dnsmasq.d'
dns:
- '127.0.0.1'
- '1.1.1.1'
network_mode: host
restart: unless-stopped
unbound:
image: klutchell/unbound:1.13.2
ports:
- '5053:5053/tcp'
- '5053:5053/udp'
restart: unless-stopped