Please follow the below template, it will help us to help you!
Hey all, I'm running pihole within docker:
Have all the necessary volume mounts etc to edit dnsmasq configuration.
However I cannot find how dnsmasq is set up as a service; the usual suspects don't exist within the docker image (systemctl, service, etc)
I do see it is probably init.d based, but I don't see dnsmasq in there
Once the user has made changes, to some customization services (such as dnsmasq) it would be useful to know how to reload said changes w/out having to restart the entire docker container.
So service pihole-FTL restart ?
(reload doesn't exist)
EDIT: tried it, and it doesn't seem to take effect the config changes in dnsmasq
(specifically I added a new /etc/hosts.local file, and ref to it from dnsmasq.d/02-mydns.conf containing addn-hosts=/etc/hosts.local)
I'm not familiar enough with Docker to guide you on Docker settings.
On bare metal, pihole-FTL uses the same configuration files as dnsmasq, since it contains dnsmasq. Local host mapping can be done in /etc/dnsmasq.d/99-hosts.conf , as an example filename. The filename should not duplicate any of the existing Pi-hole created files, nor should the Pi-hole files be modified.
This should have worked - maybe a permission issue with /etc/hosts.local.
But for only a single hostname association (as you seem in want to apply), an address option will do just as well, as would an entry in /etc/hosts. Note the latter would take precedence with competing definitions.
From within the container, that could be achieved by
pihole restartdns
The same could be triggered through Pi-hole's Settings pane by clicking Restart DNS resolver.
Does this solve your problem, or are you trying to find a way how to trigger a DNS service restart programmatically from outside the container?