My Pi Hole

I found a really cheap, really old mac mini. So old that it was outside Apple’s period to update the software and decided to throw some Linux on that bitch and then get containerizing!

**I tried installing docker on the mac as is and also forcing it to upgrade but those options did not work well at all. I strongly encourage you throw some linux around if you want to easily extend the life of your old mac hardware. If you are curious which distro I went with, it was ubuntu.

After installing Docker it was pretty straight forward in getting pi-hole running. Below is the script I ran to start it.

docker run -d \
    --name pihole \
    --restart unless-stopped \
    -e TZ="America/Los_Angeles" \
    -e WEBPASSWORD="UrAmazingAndWonderful" \
    -v "$(pwd)/pihole/etc:/etc/pihole" \
    -v "$(pwd)/pihole/dnsmasq.d:/etc/dnsmasq.d" \
    -p 8081:80 \
    -p 53:53/tcp \
    -p 53:53/udp \
    pihole/pihole:latest

A couple things to point out here:

  • — restart unless-stopped => This makes the docker container restart if anything should stop it, i.e. the mac mini restarting or docker restarting etc etc
  • -e WEBPASSWORD=”UrAmazingAndWonderful” => Replace this with some secret password and make sure you record this as you will need it to login later with.
  • -v “$(pwd)/pihole/etc:/etc/pihole” => Map a directory on the mac mini $(pwd)/pihole/etc to etc/pihole on the container. This will allow you to see the files the container is using plus it ensure the file persists between restarts
  • -v “$(pwd)/pihole/dnsmasq.d:/etc/dnsmasq.d” => Again, samething persisting this across container restarts

Website Powered by WordPress.com.

Up ↑