Docker pihole

@diginc
I do not mean to appear dense or anything. I have the pihole docker image on my readynas, and i am a bit confused with your github and just what address the admin page would be on. Could you please dumb down some related instruction for me?

Whatever your ServerIP environment variable was + your web port your expose (80 is recommended by default) + /admin on the end.

in other words: If 192.168.20.10 is the IP of your readynas/docker server's external IP ... docker run -d -e ServerIP=192.168.20.10 -p 80:80 -p 53:53 -p 53:53/udp diginc/pi-hole (if I typed that from memory right)

would expose: http://192.168.20.10/admin

or docker run -d -e ServerIP=192.168.10.5 -p 8080:80 would expose http://192.168.10.5:8080/admin

1 Like

docker: Error response from daemon: driver failed programming external connectivity on endpoint nervous_heisenberg (6949bcf2a326db2b64c073885666a1f81d3aef828d209f01c46e13117bb8aff0): Error starting userland proxy: listen tcp 0.0.0.0 ---with sudo

docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post docker.sock/v1.32/containers/create" target="new">http://%2Fvar%2Frun%2Fdocker.sock/v1.32/containers/create: dial unix /var/run/docker.sock: connect: permission denied ---without

Should I have the pihole container running while issuing those commands?
Iv'e seen the endpoint section - should the pihole image be inside a separate endpoint other that the portainer management?
And Iv'e run the second command and just to check anyway, port 80 is the one being listened to by the readynas interface and i tried /admin with no luck.
the second command just outputs - run command in new container.

Geez, There are so many configurations... i did not realize. Should the image be connected to local, bridge, or container?

Before you try to run my image have you successfully ran any others, that error looks kind of like a docker service and or permission to docker issue.

Try running https://hub.docker.com/_/hello-world/ for instance. Get started | Docker Docs may also be valuable.

'Bridge' mode is docker's default default and what I recommend my container run as. Keep in mind I'm also unfamiliar with readynas's implementation of docker, I'm not sure how different it is from what I deal with day to day: the command line docker interface.

I've been trying to get your reverse proxy compose to work but it keeps throwing a similar error to above:

Error response from daemon: driver failed programming external connectivity on endpoint pihole (e381a4814cf09c09d1e541ba6e98cf4207b1903af5f76ba6ac2bf4501e598286): Bind for 0.0.0.0:80 failed: port is already allocated.

Admittedly, I'm not a networking guru, but I run a fairly large and complex docker network. I'm just having trouble figuring this one out. Anything you can think of that I could try?

Run below one in the container to see running daemons and sockets they use:

sudo netstat -nltup

Pi-hole uses lighttpd on port 80 and from your posting, it sounds like some other software (apache, nginx, etc) took possession of port 80 and conflicting with lighttpd.