-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issues with running multiple instances on a machine #726
Comments
We're happy to accept Pull Requests to address issues. I think picking one PR from a year ago and using that as an example of us not being responsive is a bit disingenuous, but I'll take that comment as a general statement and not a slight against Pi-hole. As for building a local docker image, it should be a matter of doing a build on the dockerfile you would be using as the basis for any PRs. |
Sorry, I wasn't trying to make a general statement, just the one PR I happened to notice and having just found the project I had no idea how active development is. I'll work on figuring out how to build and run an image locally. How often do you make new releases or is pihole/pihole:latest just the tip of the master branch? Thank you! |
Generally they're in line with releases in the non-container repos (https://github.com/pi-hole/pi-hole, https://github.com/pi-hole/adminLTE, https://github.com/pi-hole/FTL), however sometimes more pressing bug fixes have been known to be released separately.
|
Have to add the usual caveat: Do not use |
OK will take that under consideration.. maybe README.md / docker_run.sh / docker-compose.yml.example should be updated to use a specific version, with a comment suggesting to use latest specific release? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
updated the title to better reflect that it is possible to run multiple instances, but there are issues that need to be worked around in somewhat hacky ways. the goal here is to support this use case out of the box via documented config options. |
This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days. |
Versions
Platform
Expected behavior
Hi, I am trying to run multiple instances of pi-hole in docker on a Raspberry Pi. I have configured several IP addresses for eth0 using virtual interfaces eth0:[0..4]. I am using network=host mode.
I have been able to work around all the issues encountered, however, this is not ideal as one of the issues in particular requires scripting in the run script, meaning that docker restarts will not work.
For the other issues, it would be much cleaner to have options to support this use case.
The biggest problem is that setup_lighttpd_bind in docker-pi-hole/bash_functions.sh unconditionally binds the localhost interface when using '--net=host' mode, i.e.:
$SERVER["socket"] == "127.0.0.1:80" {}
This can be worked around in the run script by running a 'docker exec' script after 'docker run' to wait until /etc/lighttpd/lighttpd.conf has been re-written, then remove that line, and restart lighttpd. However, this means that the normal docker restart mechanism will not be able to restart the container. So the simplest fix is adding an option to bind only the ServerIP. Issue [Feature Request]: Docker environment variable to specify IP lighttpd should bind on #398 is related, and asks for a way to specify an IP address for lighttpd to bind (different from ServerIP); this would also solve the problem.
Additionally, lighttpd always listens on all IPv6 addresses, i.e. (:::80), ignoring ServerIPv6, as documented in Issue setup_lighttpd_bind needed for IPv6 #163 and Issue lighthttp listens on all IPv6 addresses #239 There is a pull request If provided lighttpd will bind to ServerIPv6 in host mode #543 to resolve these which should also solve the issue here. Thankfully I do not need IPv6 and just turned it off with '-e IPv6="false"'.
Next, dnsmasq always binds all interfaces; see Issue dnsmasq binds to all interfaces even if you specify a listen interface #491. We need an option to add the following to 01-pihole.conf:
listen-address=$ServerIP
bind-interfaces
this could be the same option as used for item 1 above. I am able to work around this by adding those lines manually to /etc/dnsmasq.d/02-custom.conf which seems to be preserved across restarts. However, see item 4 below.
Finally, forcing dnsmasq to only bind to the $ServerIP in item 3 above results in the HEALTHCHECK failing. This can be overridden using the 'docker run' options --health-cmd and related --health-* options but is not ideal.
I can probably fix at least some of these and send pull request(s), if you are actually willing to accept them. Given pull request #543 has not been merged in a year+, I'm not sure it is worth my time to send patches that will not be acted upon.
If you are interested in my working on fixes for these issues, is there a document that explains how to build the docker image from my local git repo and use it locally?
thank you!
Greg
The text was updated successfully, but these errors were encountered: