Setup on Pi in Docker - Bind Error

#1

Hoping this is a simple issue that I just can’t see. I’m trying to install Pi-hole on Raspberry Pi in Docker through docker-compose file. I receive the following error:

ERROR: for pihole Cannot start service pihole: driver failed programming external connectivity on endpoint pihole (c6ddeb24bf33865868ea14647e136d1e343ab7d4e149e866e04d840c4edab28a): Error starting userland proxy: listen udp 0.0.0.0:53: bind: address already in use

If I run:

sudo netstat -tulpn | grep LISTEN

I don’t see any use of port 53

My docker-compose file:

pihole:
    container_name: pihole
    image: pihole/pihole:4.1_armhf
    ports:
      - 53:53/tcp
      - 53:53/udp
      - 67:67/udp
      - 80:80/tcp
      - 443:443/tcp
    environment:
      TZ: 'America/Chicago'
      WEBPASSWORD: 'redacted'
    volumes:
       - '/home/cshinn/docker_files/pihole:/etc/pihole'
       - '/home/cshinn/docker_files/pihole/dnsmasq.d:/etc/dnsmasq.d'
    # run `touch ./var-log/pihole.log` first unless you like errors
    # - './var-log/pihole.log:/var/log/pihole.log'
    dns:
      - 127.0.0.1
      - 1.1.1.1
    # Recommended but not required (DHCP needs NET_ADMIN)
    #   https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
    cap_add:
      - NET_ADMIN
    restart: unless-stopped
0 Likes

assigned diginc #2
0 Likes

#3

The readme documents the most common port 53 conflicts:

  • Port conflicts? Stop your server’s existing DNS / Web services.
    • Ubuntu users especially may need to shut off dns on your docker server so it can run in the container on port 53
0 Likes