Pi Hole

docker-compose.yml

version: "3.7"

services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "443:443/tcp"
    expose:
      - "80/tcp"
    environment:
      TZ: Europe/Madrid
      WEBPASSWORD: GENERATE_SECURE_PASSWORD_HERE
      # https://freedns.zone
      DNS1: 37.235.1.174
      DNS2: 37.235.1.177
    # Volumes store your data between container upgrades
    volumes:
      - ./pihole/data:/etc/pihole
      - ./pihole/dnsmasq:/etc/dnsmasq.d
    dns:
      - 127.0.0.1
      - 1.1.1.1
    hostname: pihole
    restart: unless-stopped
    privileged: true