Can't get DHCP to work in my pihole container

The issue I am facing:

Hello,

I've just done a fresh debian 12 install on my home server and i'm using Docker as well.
I'm trying to install Pihole in a container and to have the DHCP working rather than the one of my ISP router.

After enabling the DHCP on the pihole interface, i disable the DHCP on the ISP router, then if i check my ip on my client (windows PC), i don't have a ip in the specified range but i'm having an APIPA ip adress.

I've tried many docker run command but without any success.

The first one i've tried is

sudo docker run -d \
  --name pihole \
  -p 53:53/tcp -p 53:53/udp \
  -p 67:67/udp \
  -p 80:80/tcp \
  -e TZ="Europe/Paris" \
  -e WEBPASSWORD="ton_mot_de_passe" \
  -e PIHOLE_DNS_="1.1.1.1;1.0.0.1" \
  --cap-add=NET_ADMIN \
  -v pihole_config:/etc/pihole \
  -v dnsmasq_config:/etc/dnsmasq.d \
  --restart=unless-stopped \
  pihole/pihole:latest

Then after some research i've tried :

sudo docker run -d \
  --name pihole \
  -p 53:53/tcp -p 53:53/udp \
  -p 67:67/udp \
  -p 80:80/tcp \
  -e TZ="Europe/Paris" \
  -e WEBPASSWORD="ton_mot_de_passe" \
  -e PIHOLE_DNS_="1.1.1.1;1.0.0.1" \
  --cap-add=NET_ADMIN \
  --cap-add=SYS_NICE \
  --cap-add=SYS_TIME \
  -v pihole_config:/etc/pihole \
  -v dnsmasq_config:/etc/dnsmasq.d \
  --restart=unless-stopped \
  pihole/pihole:latest

Then i've added

--network host \

or

--net=host  \

but none of them worked properly.

On my client (windows 11), i can't get the ipconfig /renew to end with a new ip within the range set in pihole.

If you need more informations, do not hesitate to ask :slight_smile:

Thanks a lot for you help.

Details about my system:

Debian 12.1
Pihole : latest docker image.

--net=host would be correct for docker run scripts.

Where exactly did you add that?

I'va added it in the docker run command right after the ports declaration if i remember well.

Note:

In host mode ports are ignored and you should remove them from your command.

From docker docs:


To help us understand your configuration, please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:

docker exec -it <pihole-container-name-or-id> pihole -d

where you substitute <pihole-container-name-or-id> as required.

Thanks for your answer and here is the debug token :slight_smile: : debug token

any help ? thanks :grin: