Hi everyone,
When running Pi-hole inside Docker, I encountered errors when the container tries to fetch from GitHub:
fatal: unable to access 'https://github.com/pi-hole/pi-hole/': Failed to connect to github.com port 443 after 2938 ms: Could not connect to server
fatal: unable to access 'https://github.com/pi-hole/web/': Failed to connect to github.com port 443 after 949 ms: Could not connect to server
fatal: unable to access 'https://github.com/pi-hole/FTL/': Failed to connect to github.com port 443 after 945 ms: Could not connect to server
I am located in China, where accessing GitHub directly is often unreliable. Normally, we solve this issue by setting an HTTP/HTTPS proxy.
I tried setting the following environment variables when running the container:
environment:
- http_proxy=http://my-proxy:port
- https_proxy=http://my-proxy:port
- no_proxy=localhost,127.0.0.1
But Pi-hole services inside the container (e.g., FTL update scripts, git commands) still fail to use the proxy.
Questions:
-
Is there a supported way to configure Pi-hole Docker so that all outbound traffic (especially
git clone/git fetchduring updates) goes through a proxy? -
Do I need to configure proxy variables somewhere inside the container (e.g.,
/etc/environment, git global config), or should thedocker run -e http_proxyapproach already work? -
Is there any known limitation with Pi-hole services ignoring proxy settings?
Thanks a lot!