I wanted to secure my home network a little more and block those irritating adds you see more and more on the net.
After some searching I came across Pi-Hole. And available as a Docker so party on 🙂

Well we are going to create a macvlan in docker. That gives us a bit of wiggle room with ports that already are configured. So with macvlan in Docker we can give containers their own ip.

Connect to your Pi terminal or ssh session. Adjust he subnet and gateway so it corresponds with your network.

sudo docker network create -d macvlan –subnet= –gateway= -o parent=eth0 macvlan

Now we are going to install the Pi-Hole.

In your terminal:

sudo mkdir /docker/pi-hole && cd /docker/pi-hole
sudo nano docker-compose.yml

Copy and adjust the text below:

version: '2'
    container_name: pihole
    image: pihole/pihole:latest
    hostname: pihole0
      - NET_ADMIN
      macvlan: # same as network specified below
        ipv4_address: # the IP of the pihole container
      - # use local DNS, since the pihole 
      - # optional fallback DNS
    ports: # expose all pihole ports.
      - 443/tcp
      - 53/tcp
      - 53/udp
      - 67/udp
      - 80/tcp
    volumes: # mount our data volumes.
       - '/docker/pi-hole/etc-pihole/:/etc/pihole/'
       - '/docker/pi-hole/etc-dnsmasq.d/:/etc/dnsmasq.d/'
       - '/docker/pi-hole/backups/:/backups/'
      ServerIP: # must match ipv4_address above
      WEBPASSWORD: "somepassword"
      TZ: 'Europe/Amsterdam' # pick your timezone
    restart: unless-stopped

    external: true

Close the file and now its time to bring up the docker.

sudo docker-compose up -d

After a minute Pihole should be up and running and you could access it: http://your.ip