Running Pi-hole docker, anyone?

  • Is it possible to run a pi-hole docker container on OMV in a way which avoids a clash on port 80?


    I know little about the technicalities of webservers, but I naively thought changing the OMV web-gui port from 80 would allow OMV and pi-hole to coexist. This doesn’t work, at least not for me.


    Creating a VM for pi-hole will work, but it is resource heavy compared to running a docker image. If you have an unused NIC on your OMV box, and a spare switch/router port, then of course a pi-hole docker container can bind to this.


    So has anyone worked a more advanced configuration which allows a pi-hole container to run within OMV?


    PS OMV has plugins and docker images for nginx, so I guess there are people who run more than one instance of nginx on OMV and do clever stuff to run multiple webservers, all of which is over my head. Maybe bridging between a real interface and a virtual nic to which the pi-hole container binds is another idea.

  • Well, I must be getting senile. And now I'm even talking to myself and can answer my own question.


    Something very odd here but on a another attempt just changing the OMV web-gui port from 80 to 90, for example, allows the pi-hole docker container to run OK.


    First time I did this was via the web-gui itself, second time I used omv-firstaid at the the CLI. Would that have made a difference?

  • I just setup a VM to run pi-hole last night. "Resource heavy" is not the term I'd use. You don't even know it's there. I'm running DietPi which is a very lightweight Debian distro designed to run on SBC's but you can download a DietPi Vbox file so you don't even need to do an install. VM is configured to use a bridged adapter so pi-hole has a different IP from OMV.

  • Well, I did say in comparison. rather than absolute terms. At least there are alternatives ....


    How do you deal with flushing pihole logs and updates? Using a docker container allows you just to add cronjobs in OMV to do this with commands like:


    /usr/bin/docker exec <container-name> pihole flush

  • Just a comment, you don't need to change ports for using the convenience of port 80. Reverse proxy (nginx) can redirect every request depending on the domain to another port silently.
    Also if you want to use docker with you home lan you can create a docker macvlan type network. So you don't have to masquerade or use a static route. The only caveat of this is that host-container net communication IS NOT POSSIBLE. For this case (pi-hole) I guess that doesn't matter.

  • Just a comment, you don't need to change ports for using the convenience of port 80. Reverse proxy (nginx) can redirect every request depending on the domain to another port silently.
    Also if you want to use docker with you home lan you can create a docker macvlan type network. So you don't have to masquerade or use a static route. The only caveat of this is that host-container net communication IS NOT POSSIBLE. For this case (pi-hole) I guess that doesn't matter.

    Well, I'm not sure I fully understood the bit about macvlan and how you don't need masquerade or use a static route. But I've created a docker macvlan on my OMV box and must missed something and made errors as I cant get a functioning pihole container. It appears to be running but cannot be accessed via the ip I gave it. I'll post a docker question elsewhere as this is now a general question about using docker containers.

  • Well, I'm not sure I fully understood the bit about macvlan and how you don't need masquerade or use a static route. But I've created a docker macvlan on my OMV box and must missed something and made errors as I cant get a functioning pihole container. It appears to be running but cannot be accessed via the ip I gave it. I'll post a docker question elsewhere as this is now a general question about using docker containers.


    Did you end up figuring this one out?
    If so could you outline the steps please?

  • Somewhat bumping this post. I would also like to install Pi-Hole within a Docker, but I am having issues to to configure it and make it work. Any help with the configuration is highly appreciated.

    Custom mini-ITX build
    Coolcube Mini, Intel Desktop Board DQ77KB, Intel Core i3-3220, 8 GB DDR3 Ram, 30 GB Sandisk SSDnow 200 (OS), 1 TB Samsung M8 HN-M101MBB

    Dell Optiplex 960 sff (deprecated) - link


    Dell Optiplex FX160 (repurposed) - link


    "If you can't find it in Google, it simply doesn't exist!" - The Internetz


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!