I've created an installer script for my pi-hole docker container, in this script I copy my blacklists, adlists, ... into the /etc/pihole folder, and a preconfigured list of local hostnames to the /etc/hosts file.
But apparently when the container is restarted the /etc/hosts file is overwritten. How can I prevent this? Or is there an other way to add my own hostnames to that file after a container restart?
I tried adding them by creating the /etc/dnsmasq_static_hosts.conf file, but that didn't work for the web interface, not sure if the file is even used.
When adding the hosts file content to a file inside /etc/dnsmasq.d it returns a syntax error for that file.