docker-pi-hole
docker-pi-hole copied to clipboard
ServerIP still required?
Hello Everyone,
it looks like ServerIP is still required, regardless the improvement in #944, documented in https://github.com/pi-hole/docker-pi-hole/tree/3f97e6e4fc37cb7077f336cfa6a048105c0e6867#recommended-variables.
These are the logs when starting the new docker image:
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 01-resolver-resolv: applying...
[fix-attrs.d] 01-resolver-resolv: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 20-start.sh: executing...
::: Starting docker specific checks & setup for docker pihole/pihole
[i] Installing configs from /etc/.pihole...
[i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
[✓] Installed /etc/dnsmasq.d/01-pihole.conf
[✓] Installed /etc/dnsmasq.d/06-rfc6761.conf
Applying pihole-FTL.conf setting REPLY_ADDR4=***.***.***.***
Setting DNS servers based on PIHOLE_DNS_ variable
::: Pre existing WEBPASSWORD found
[✓] Setting admin contact to *********@********
DNSMasq binding to default interface: eth0
Added ENV to php:
"PIHOLE_DOCKER_TAG" => "2021.12.1",
"PHP_ERROR_LOG" => "/var/log/lighttpd/error.log",
"ServerIP" => "0.0.0.0",
"CORS_HOSTS" => "",
"VIRTUAL_HOST" => "********.********.home",
Using IPv4
...
This is a: Bug
Details
I assume ServerIP to be no more required but logs mention it so either it is still required i.e. not deprecated or logs should be fixed.
Related Issues
- [x] I have searched this repository/Pi-hole forums for existing issues and pull requests that look similar
How to reproduce the issue
- Run the latest
2021.12.1image - it's there since2021-11 - Replace
ServerIPwithFTLCONF_REPLY_ADDR4, in the docker-compose you're running fine on2021.10.1
These common fixes didn't work for my issue
- [ ] I have tried removing/destroying my container, and re-creating a new container
- [ ] I have tried fresh volume data by backing up and moving/removing the old volume data
- [ ] I have tried running the stock
docker runexample(s) in the readme (removing any customizations I added) - [x] I have tried a newer or older version of Docker Pi-hole (depending what version the issue started in for me)
- [ ] I have tried running without my volume data mounts to eliminate volumes as the cause
I don't think I understand. Can you explain a bit more about what is broken or not working?
Hi @dschaper,
nothing is broken in terms of features but ServerIP is no more set as an ENV VAR by me but by the existing Dockerfile.
Being new to pi-hole code, at first glance it could be just a matter of fixing what written by logs by adding/removing relevant ENV VARs, at least adding FTLCONF_REPLY_ADDR4 too: https://github.com/pi-hole/docker-pi-hole/blob/523762e47d30571db11c0fc7e90351a029319ec9/bash_functions.sh#L220.
But... there are other places which look at ServerIP e.g. https://github.com/pi-hole/docker-pi-hole/blob/523762e47d30571db11c0fc7e90351a029319ec9/bash_functions.sh#L49.
I feel that a cleanup should be required to remove the usage of ServerIP in several places, including tests:
- [ ] https://github.com/pi-hole/docker-pi-hole/blob/523762e47d30571db11c0fc7e90351a029319ec9/bash_functions.sh#L49
- [ ] https://github.com/pi-hole/docker-pi-hole/blob/b0a5a0f163804ce8e587f76b8ca508d2a9eddd59/docker_run.sh#L21
- [ ] https://github.com/pi-hole/docker-pi-hole/blob/523762e47d30571db11c0fc7e90351a029319ec9/Dockerfile#L39
- [ ] https://github.com/pi-hole/docker-pi-hole/blob/20cd9c3abf95e00d2d1920ba432e2a0272c42942/test/test_start.py#L11
- [ ] https://github.com/pi-hole/docker-pi-hole/blob/6c3ccfcd4fbfcad0871b90a6c86245940c4f556d/test/test_bash_functions.py#L160
- [ ] https://github.com/pi-hole/docker-pi-hole/blob/b0a5a0f163804ce8e587f76b8ca508d2a9eddd59/docker-compose-nginx-proxy.yml#L33
- [ ] https://github.com/pi-hole/docker-pi-hole/blob/b0a5a0f163804ce8e587f76b8ca508d2a9eddd59/README.md?plain=1#L121 while keeping it for backward compat in:
- [x] https://github.com/pi-hole/docker-pi-hole/blob/4aaf0998a3562ce464e29f2026c0319c2767fe06/start.sh#L80
Kind of two separate issues: this one to cleanup the logs and another one to actually deprecate ServerIP*.
HTH, Matteo
Hiya, thanks for opening this issue. I made a similar note about this in a review comment for the PR that added the new FTLCONF_ variable. https://github.com/pi-hole/docker-pi-hole/pull/944#discussion_r756401249
I feel that a cleanup should be required
Absolutely agree here! I filed it under "At some point in the future, I'll have the time and energy to sit down and untangle this from the repo" - and am yet to find the time or energy for 😏
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.
Hi bot!
Based on https://github.com/pi-hole/docker-pi-hole/issues/956#issuecomment-1002295947 I think this could be the issue useful to track the vision of @PromoFaux .
HTH, Matteo
Gosh, has it been a month already?
I've added the Help Wanted label just in case anyone else would like to dip their toes into the repo, too (and never-stale to stop the bot from marking it stale!)
This issue has been mentioned on Pi-hole Userspace. There might be relevant details there:
https://discourse.pi-hole.net/t/pihole-freezing-randomly-apparently/53200/7
This issue has been mentioned on Pi-hole Userspace. There might be relevant details there:
https://discourse.pi-hole.net/t/local-dns-records-not-resolved-on-mobile-devices/53272/5
This issue has been mentioned on Pi-hole Userspace. There might be relevant details there:
https://discourse.pi-hole.net/t/pihole-not-resolving-it-s-own-hostname/53396/4
This issue has been mentioned on Pi-hole Userspace. There might be relevant details there:
https://discourse.pi-hole.net/t/finding-the-source-of-a-rebind/53449/20
I stumbled upon this while I tried to use only non deprecated variables/settings. I need to bind the lighttpd listen address to a virtual eth interface while using docker mode host. With setting ServerIP ENV it works.
Readme says it is deprecated so I tried to use REPLY_ADDR4 only. This sets the listen interface to 0.0.0.0 as described by OP. Furthermore I read at https://docs.pi-hole.net/ftldns/configfile/ that REPLY_ADDR4 is also deprecated. That leaves me confused.
So, what is now or in the future the correct way to bind the lighttpd to one specific address while using docker host mode?
I stumbled upon this while I tried to use only non deprecated variables/settings. I need to bind the lighttpd listen address to a virtual eth interface while using docker mode host. With setting ServerIP ENV it works.
Readme says it is deprecated so I tried to use REPLY_ADDR4 only. This sets the listen interface to 0.0.0.0 as described by OP. Furthermore I read at https://docs.pi-hole.net/ftldns/configfile/ that REPLY_ADDR4 is also deprecated. That leaves me confused.
So, what is now or in the future the correct way to bind the lighttpd to one specific address while using docker host mode?
I second this. This situation is very confusing.
docker-pi-hole readme https://github.com/pi-hole/docker-pi-hole/blob/72634fcbc25a6893c10cef4ed3e8c382a523a252/README.md?plain=1#L166
says to use FTLCONF_REPLY_ADDR4 instead of ServerIP

Pi-hole documentation says that REPLY_ADDR4 is deprecated, LOCAL_IPV4 must be used instead

Deprecated is not the same as removed. It's still there for now, and will be read by FTL, so the documentation is not incorrect. :)
Thanks, however, for the pointer - I will look at changing the suggested variable to use instead of REPLY_ADDR4
Binding lighthttpd for IPv4 works now with the new Docker image when using FTLCONF_LOCAL_IPV4.
But IPv6 is still binding to every IP:
tcp6 0 0 :::80 :::* LISTEN 13884/lighttpd
I set FTLCONF_LOCAL_IPV6 and FTLCONF_LOCAL_IPV4 via my docker-compose file. ServerIP is not set.
Edit: Typo corrected.
Hi guys, Is it also now somehow possible to bind two IPs with the FTLCONF_LOCAL_IPV4? Use case is accessing the website from the host IP address and also a Virtual IP address.
Edit: Ah, just leaving out the vars completely sets LOCAL_IPV4=0.0.0.0. So that's fine for my use case.
I stumbled upon this issue because I had no luck setting up pi hole correctly with the given documentation, or any of the information in this issue. I was get pihole to work with my local devices, but the local DNS functionality won't work.
I'm confused on how to correctly setup my docker-compose.yml.
It seems like there is a lot of conflicting information here. Would anyone mind updating the recommended example docker compose?