Macvlan0: # same as network specified below Mac_address: de:ad:be:ef:ff:01 # can change or leave this Hostname: pihole # set an easy hostname to rememberĭomainname: exampledomain # your local domain name
Image: pihole/pihole:v5.0 # check the latest version on docker hub.
Open a docker-compose.yml file and paste in the following contents: version: '2' Let's start a new project under the docker/pihole directory. This will host all of your docker files in the future. Set up the PiHole docker-compose fileĬreate a directory called docker in a convenient place on your server. We are going to set up a pihole docker instance using docker-compose, and then create a virtual network interface on your linux system that is bridged using macvlan.
If you need to install docker, see the DigitalOcean article or use this ansible role. In order to get the most value out of this article, you will need: This will allow all clients to use it as a DNS server, and enable pretty usage graphs and client breakdowns in your pihole admin panel.
The final result will be a pihole docker container running with a dedicated IP, exposed to your local network. This blog post will showcase some really neat tricks using Docker's Macvlan networks and linux networking to create a pihole instance that's attached to your local network. Not everyone has a spare Raspberry Pi laying around, but some of folks do have a server with docker installed. The internet is full of ads these days, and the pihole is a fantastic way to block all these ads in a configurable manner. Set up a PiHole using Docker MacVlan Networksīy Ivan Smirnov Feb 11th 2021 Tags: docker, networking, pihole Overview