explaingit

pi-hole/docker-pi-hole

11,087ShellAudience · ops devopsComplexity · 3/5Setup · moderate

TLDR

The official Docker image for Pi-hole, which blocks ads across your entire home network, every device benefits without installing anything on each one.

Mindmap

mindmap
  root((docker-pi-hole))
    What it does
      Network-wide ad blocking
      All devices covered
      Web admin interface
    How it works
      Docker container
      DNS filtering
      Block list updates
    Optional features
      DHCP server
      Query logs
    Setup
      docker-compose file
      Volume mounts
      Single start command
    Audience
      Home users
      Self-hosters
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Block ads for every device on a home network, phones, smart TVs, and game consoles, using a single Docker container.

USE CASE 2

Replace a direct Pi-hole installation with a containerized version that is easier to update and remove.

USE CASE 3

Run Pi-hole as the DHCP server on a home network to manage IP address assignment alongside ad blocking.

Tech stack

DockerShellPi-hole

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Docker on the host and configuring your router to point DNS requests at the Pi-hole container.

License not mentioned in the explanation.

In plain English

Pi-hole is a network-wide ad blocker that runs on your own hardware. Instead of installing a browser extension that only blocks ads for one device, Pi-hole sits on your home network and blocks ad requests for every device connected to it: phones, tablets, smart TVs, game consoles, and computers all benefit without any per-device setup. This repository specifically contains the official Docker image, which is the packaging that lets you run Pi-hole inside a software container rather than installing it directly on a machine. Docker containers are a way of bundling software with everything it needs to run, so it works the same way regardless of what operating system or hardware you are using. This approach makes Pi-hole easier to install, update, and remove compared to a direct installation. It also keeps Pi-hole isolated from the rest of your system. The README walks through a quick setup using a configuration file (a docker-compose file) that tells Docker how to run the container. You copy the provided template, fill in your timezone and a web interface password, then start it with a single command. Pi-hole stores its data in folders on your machine so that settings and block lists survive when you update to a newer version of the image. Once running, Pi-hole provides a web interface for managing settings, viewing query logs, and updating the lists of domains it blocks. The container also handles automatic weekly updates to the block lists in the background. Optionally, it can serve as the DHCP server for your network, which is the service that assigns IP addresses to devices when they connect. Versioning follows a date-based scheme rather than traditional version numbers. Full documentation covering advanced configuration, upgrading, and tips lives on the Pi-hole documentation website.

Copy-paste prompts

Prompt 1
Help me set up the Pi-hole Docker container on my home server. I need a working docker-compose.yml with my timezone configured and a custom web interface password.
Prompt 2
Walk me through configuring Pi-hole in Docker to also act as my network DHCP server, replacing the one in my router.
Prompt 3
My Pi-hole Docker container lost its block list settings after an update. How should I configure volume mounts so settings and data persist between container restarts and image upgrades?
Open on GitHub → Explain another repo

← pi-hole on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.