

Next, run the command below to pull the pihole/pihole base image from Docker hub. Your local IP address is necessary to run the single Docker command properly. Run the below command to get your local IP address.

But first, you’ll need to note your local IP address. Now that you have two persistent volumes available, you are ready to run a Docker container using Pi-hole’s base Docker image. Running Pi-hole Docker Container with Environment Variables Ĭreating two Docker Volumes for the Pi-hole Configurations. docker volume lsīelow, you see two newly created volumes named pihole_app and dns_config. Next, verify that the Docker volumes have been created successfully by running the following command which lists all Docker volumes available on your machine. You can also change the names according to your preference. Open PowerShell as administrator, then run the below commands for Docker to create two volumes ( volume create) named pihole_app and dns_config. Related: How to Create (and Manage) Docker Volumes on Windows When setting up Pi-hole in Docker container, you’ll first need to create a Docker volume to store the Pi-hole application and DNS configuration. A Windows 10 PC – This tutorial uses Windows 10 OS Build 19042.1165.Docker installed on Windows 10 (but any supported OS will work).If you’d like to follow along, be sure you have the following: This tutorial will be a hands-on demonstration. Blocking Websites via Community-Maintained Blacklists of URLs.Updating the Blocklist of Websites via Console.Blocking Websites via Pi-hole Dashboard.Enabling Home Network-Wide Blocking via Router Settings.Pointing the Host’s DNS Server to the Pi-hole IP Address.Accessing the Pi-hole Dashboard Web Interface.Running Pi-hole Docker Container with Environment Variables.
