[How to] Install Pi-Hole in Docker: Update - 05/17/18

    • core-plugin
    • [How to] Install Pi-Hole in the Docker Plugin

      Pi-Hole is a network wide ad blocker which, also, provides protection from malware sites for the users of your LAN. It functions as a DNS proxy where, by blocking name requests to known malware and advertising sites, network security and the client Internet browsing experience are improved. By eliminating many video advertising pop-up's, performance is improved as well.

      For more information visit the Pi-Hole home page.

      This Docker guide was tested on OMV3.0.90, with the docker-gui 3.1.9 plugin, and Pi-hole/Docker
      diginc/pi-hole image ID: 9e83c65df610

      Update (01/09/18):
      This Docker guide was tested on OMV3.0.96, with the docker-gui 3.1.9 plugin, and Pi-hole/Docker
      diginc/pi-hole image ID: 6b77d5329fd4

      Update (05/17/18):
      This Docker guide was tested on OMV4.1.6, with the docker-gui 4.0.1 plugin, and Pi-hole/Docker
      diginc/pi-hole image ID: eb902c685095

      If upgrading to the latest image, it is recommended that the previous container is stopped/deleted, delete the previous image, delete the macvlan driver in the networks tab and delete the file contents of /dockerparms . Then proceed with the installation of the new image as follows.**

      To insure that any potential issues with Pi-Hole do not interfere with the OMV host/server, a direct DNS server entry should be configured in OMV as follows:

      Under System, Network,click on Interfaces and Edit.

      **This example uses one of Google's DNS servers. There are other, reliable, public DNS servers available.**

      Under Services, Docker,click on the Overview Tab.

      Begin typing diginc/pi-hole in the Search bar. After a few letters are typed in, selections will appear. Click on the image, named diginc/pi-hole as shown.

      **If installing to an ARM device (Odriod, Raspberry PI, etc.), take the second selection from the top diginc/pi-hole-mulitarch.**


      The following dialog box appears, click on Start.


      When the download is complete and the check sum is verified, click Close.


      Click on the Networks tab and the Create button.

      In the Network driver drop down, select macvlan.

      Fill in the remaining highlighted fields:
      Network name: your workgroup name or domain
      Subnet: your subnetwork. (In the example provided, a subnet mask of equates to /24)
      Gateway: the IP address of your router
      Parent: OMV's Ethernet interface. In most cases, eth0


      Click Save.
      If an error is generated when saved:
      Check the interface name entered in Parent (eth0), to the name found under System, Network, Interfaces tab and Name. If it's different, use the name found in the Interfaces tab.

      Click on the Overview Tab, then the diginc/pi-hole image and the Run Image button.



      The Run image dialog box appears. In the following, there are three separate screen captures of the same dialog box. Scroll the box to fill in the required entries. (Leave the other unhighlighted, entries as they are.)

      Container Name:optional, but suggested
      Restart Policy: always

      Network mode: Macvaln
      Host name: optional,but suggested
      Select macvlan: select the network previously created
      IP address: ** Required **The IP address assigned to Pi-Hole should not be the same IP address your OMV server is using. Use a separate static address, outside of the scope of your DHCP server.**


      Scroll down to the following:

      When adding Environment variables:
      Fill out lines, as shown in the following, but note that entries will NOT be saved until the + button on each line is clicked!


      Add the following three lines to environment variables:

      ServerIP _____________ your-static-ip-here _____________________ <click the +>
      WEBPASSWORD ______ yourpasswordhere ______________________ <click the +>
      TZ __________________ yourtimezonehere ______________________ <click the +>

      (The correct entry, for your time zone, can be found here-> Time Zones in the TZ column.

      After entering the above 3 lines, Environment variables should appear as follows:



      Continue to scroll to Volumes and Bind mounts:
      Add the following entries into host path and container path fields as shown.

      **Note: If a space is inadvertently added before the "/" in any of the paths below, the container will produce an error and refuse to save.**

      Host path _______________________ Container Path

      /dockerparms/pihole _______________ /etc/pihole _________________ click the + button

      /dockerparms/pihole/dnsmasq.d ______ /etc/dnsmasq.d _____________ click the + button

      In Extra arguments,copy and paste the following line in.

      -p 80:80 -p 53:53/tcp -p53:53/udp

      The final result should appear as follows:

      Click Save.

      Test your container in a Web Browser:
      - ** Allow 2 to 3 minutes for the console web page to start.
      - Type in pihole's IPaddress/admin in the address bar.
      (In this example it's Enter the password you added to Environmental Variables.

      To finish the set up for your network, change your Router's DNS server entry to the Pi-hole's IP address. Use only the Pi-Hole address. Do not add a second or alternate DNS address.

      If you have statically addressed clients, see note 1.

      See Final Notes, two posts below:
      Good backup takes the "drama" out of computing
      OMV 3.0.99 Erasmus
      ThinkServer TS140, 12GB ECC / 32GB USB3.0
      4TB SG+4TB TS ZFS mirror/ 3TB TS

      OMV 3.0.99 Erasmus - Rsync'ed Backup
      R-PI 2 $29 / 16GB SD Card $8 / Real Time Clock $1.86
      4TB WD My Passport $119

      The post was edited 24 times, last by flmaxey: minor edits, upgrade revisions, etc. ().

    • [How to] Install Pi-Hole in Docker: Update - 05/17/18

      This applies more to the docker plugin in general but if you are running this docker on ESXi, promiscuous mode needs to enabled on VM's virtual switch.
      omv 4.1.6 arrakis | 64 bit | 4.16 backports kernel | omvextrasorg 4.1.7
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please read this before posting a question.
      Please don't PM for support... Too many PMs!
    • New

      Final Notes

      1. For statically addressed clients, it will be necessary to change the DNS entry, for each client, to Pi-Hole's IP address.
      2. Use only Pi-Hole's IP address as the DNS server. Setting a second, "alternate DNS address" will allow Pi-Hole to be bypassed under certain conditions.
      3. Pi-Hole can be bypassed, on a per client basis, by entering a public DNS server IP address in your client's network attributes.
      4. After your docker container is running and the Pi-Hole server is working and tested, avoid using the Container Modify button. While white and blacklists are persistent, as the Modify dialog warning indicates, the most minor change will result in the loss of Pi-hole's log files.
      6. Multicast and minidlna were not tested.

      Additional Information:
      Pi-Hole Web Site: pi-hole.net
      A Docker tutorial is available at: docker-curriculum.com/
      Good backup takes the "drama" out of computing
      OMV 3.0.99 Erasmus
      ThinkServer TS140, 12GB ECC / 32GB USB3.0
      4TB SG+4TB TS ZFS mirror/ 3TB TS

      OMV 3.0.99 Erasmus - Rsync'ed Backup
      R-PI 2 $29 / 16GB SD Card $8 / Real Time Clock $1.86
      4TB WD My Passport $119

      The post was edited 2 times, last by flmaxey: edit ().

    • Users Online 2

      1 Member and 1 Guest