Hi there. I'm having issues with DHCP not being enabled on startup (or after reboot) even though i beleive i have configured my docker-compose correctly.
After a reboot (or after docker-compose up -d) I have to manually set my IP/Gateway/DNS on one of my devices to be able to get to the web portal and go and enable DHCP.
I'm not having issues once i manually turn it on, its just frustrating that after the Pi reboots i have to go back and turn it on.
Would someone be able to have a quick look and see if there are any red flags? (have i done something stupid?)
My expectation is with my "environment" settings for DHCP_ACTIVE, DHCP_START, and DHCP_END that DHCP should be active out of the box. The start/end IP seems to be carried over correctly into the Web UI, but the DHCP checkbox is unchecked.
version: "3.9"
services:
pihole:
image: pihole/pihole:latest
container_name: pihole
ports:
- "53:53/tcp"
- "53:53/udp"
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.pihole.rule=Host(`pihole.pi.lan`)"
- "traefik.http.services.pihole.loadbalancer.server.port=80"
- "traefik.http.routers.api.entrypoints=web"
cap_add:
- NET_ADMIN
dns:
- 127.0.0.1
- 1.1.1.1
environment:
ServerIP: ${SERVERIP:?Server IP not set}
PIHOLE_DNS_: 1.1.1.1;1.0.0.1
VIRTUAL_HOST: pi.lan
DNSMASQ_LISTENING: all
DHCP_ACTIVE: "true"
DHCP_START: ${DHCPSTART:?DHCP start IP not set}
DHCP_END: ${DHCPEND:?DHCP end IP not set}
DHCP_IPv6: "true"
DHCP_rapid_commit: "true"
WEBPASSWORD: ${WEBPASS}
extra_hosts:
- "pihole.pi.lan:${SERVERIP}"
- "traefik.pi.lan:${SERVERIP}"
volumes:
- "./pihole/:/etc/pihole/"
- "./dnsmasq.d/:/etc/dnsmasq.d/"
depends_on:
- dhcphelper
networks:
backend:
ipv4_address: "172.20.0.100"
pi: {}
dhcphelper:
build: ./dhcp-helper
container_name: dhcphelper
restart: unless-stopped
network_mode: "host"
command: -s 172.20.0.100
cap_add:
- NET_ADMIN
networks:
backend:
ipam:
config:
- subnet: 172.20.0.0/16
pi:
external: true