Pi-Hole on Raspberry Pi using Docker

Spread the love

In this segment we are going to “Install Pi-Hole on Raspberry Pi B Plus with the help of Docker “

What is Pi-Hole ?

Pi-hole is a Linux network-level advertisement and Internet tracker blocking application which acts as a DNS sinkhole (and optionally a DHCP server), intended for use on a private network. It is designed for use on embedded devices with network capability, such as the Raspberry Pi, but it can be used on other machines running Linux and cloud implementations.
Pi-hole has the ability to block traditional website adverts as well as adverts in unconventional places, such as smart TVs and mobile operating system adverts.

pihole
    Equipment Equipment Required :
Equipment Raspberry Pi
Equipment Micro SD Card 8 GB
Equipment Power Supply
Equipment Ethernet Cord for LAN Connection
Equipment External Hard Drive or USB Drive
    Equipment Optional :
Equipment Raspberry Pi Case
Equipment Keyboard
Equipment Mouse

Raspbian OS Installation

Download Raspbian OS from Official Website : raspberrypi.org
Then write the image to the SD Card using : Etcher

etcher
Writing Image to SD Card

Now, Boot the Raspberry Pi with this SD Card, Follow the On-Screen Instructions and then open Terminal.

Pull Pi-Hole Docker Image

 docker pull pihole/pihole

 Run Pi-Hole Docker Image

 docker run -d \
    --name pihole \
    -p 53:53/tcp \
    -p 53:53/udp \
    -p 67:67/udp \
    -p 80:80 \
    -p 443:443 \
    -e PUID=1000 -e PGID=1000 \
    -e TZ=Asia/Kolkata \
    -v /mnt/pihole/pihole/:/etc/pihole/ \
    -v /mnt/pihole/dnsmasq.d/:/etc/dnsmasq.d/ \
    -e 127.0.0.1 \
    -e 1.1.1.1 \
    --restart=unless-stopped \
    pihole/pihole:latest 

 Access Pi-Hole Web Interface

 http://IP/admin/

 To get random Password

docker logs pihole 2 /dev/null | 'grep password:'

 Reset Pi-Hole Password

docker exec -it pihole pihole -a -p

Now, You are ready to use Pi-Hole on your Raspberry Pi with Docker.
If you come across any issues or have some feedback related to this tutorial,
Please share your thoughts. Smile (“_”)


Spread the love