Your docker-compose does not currently pass an INTERFACE into your Pi-hole container, so setting DNSMASQ_LISTENING to local would have your Pi-hole accept DNS queries from all interfaces that it is aware of. In the case of Docker's host network mode, this would comprise all interfaces of the machine hosting Docker.
Your docker-compose is missing a volume for /etc/dnsmasq.d/.
It would be customary to also mount that, in order to persist configuration changes as initiated via Pi-hole's UI.
With regard to your observation:
Could you check /etc/dnsmasq.d/01-pihole.conf within(!) your container for the existence of domain-needed and bogus-priv options while omitting them from your config?
Thanks for your help, so I have to use these two parameters together?
DNSMASQ_LISTENING: local
INTERFACE: eno1
On my host machine, eno1 is the interface with the inet assigned
I edited the docker compose it was copied incorrectly, how can I make it persistent ?
domain-needed and bogus-priv are not present in the /etc/dnsmasq.d/01-pihole.conf within the container if i remove the options in the docker-compose.yml
Pi-hole would default to local listening, and that commonly works for most dockered Pi-holes.
You'd usually add an interface if you'd plan to switch to one of the other listening modes, and/or if your Docker's network driver in conjunction with other services would make restricting to a specific interface desirable for your environment.
If you do not have any special requirements, it should not be necessary to provide an INTERFACE - you should be fine with the defaults.
As far as DNS_FQDN_REQUIRED and DNS_BOGUS_PRIV are concerned, your observation seems to suggest that indeed the documentation would differ from actual behaviour.
@Promofaux, it would seem the current v5 image would not populate DNS_FQDN_REQUIRED and DNS_BOGUS_PRIV with true as documented?
I'm not able to test it right now (it's Saturday night and it's late), but reading the code I think the default values are set when the environment variables are empty.
The startup script sources basic-install.sh script:
If no values are initially set, then the default value (true) are set by these lines (in basic-install.sh):
And these lines finally save the values in SetupVars.conf:
I don't remember any similar complaints, but this doesn't mean your observation is wrong.
Let's wait for PromoFaux's answer. Maybe he has a more detailed explanation.