So i test a "sudo ifconfig eth0 promisc"on the raspberry and DHCP was working again with a macvlan configuration on the container, it's still not working with bridge
I still have some error, but i think it's my fault (misconfiguration), i'll continue to search.
There is no official support for IOT stack as build environment.
Still, since you are using the official image, it might be useful to check Pi-hole's documentation on Docker DHCP as well as Pi-hole Docker on GitHub.
Also, your observation that DHCP requests are successful once traffic is initiated from the machine running Pi-hole may hint at a port conflict or firewall issue, probably with your host OS.
Hi,
I read the Pi-Hole documentation for Docker DHCP, and decide to make it work with macvlan as mentioned in this link:
As the container got a dedicated IP with macvlan there is not port issue nor firewall issue as the container don't have any firewall.
The little problem i still had yesterday are solved, so i can confirm the "sudo ifconfig eth0 promisc" command solved the problem for me.
it's not ideal to let the NIC in promiscuous mode, but it works.
Promiscuous mode force the NIC to listen every packet even those with another target, so i think something in the raspbian kernel, or in the container drop DHCP packet if promiscuous mode is not enabled...but i don't know why.
Your Docker configuration as posted by you above significantly differs from Tony Lawrence's sample configuration that Pi-hole's aforementioned macvlan documentation ultimately links to.
Specifically, it is missing the networks relevant parts that may be crucial for your situation.
It may be worth revisiting Pi-hole's documentation and also to check out the documentation it links to: Tony Lawrence's blog is nicely detailing the necessary configuration.
Should you decide to give that another try, please let us know if that did help you to avoid putting an interface into promiscuous mode.