Pi-hole container "unhealthy"

Guys,

I've been running Pi-hole without trouble for weeks now, in a docker container on a NUC.
Having seen the recent update, I tried a pi-hole -up in the container but got a message that wouldn't work.
So I deleted the container and image and did a fresh docker-compose up -d to reinstall pi-hole from, the latest image.
But now now the pi-hole container is switching between starting and unhealthy, not accessiblethe configured port...
I even deleted the local ./etc-pihole and ./etc-dnsmsq.d folders, the docker image, the docker container, before doing ac fresh install with docker-compose up -d...
Nothing changes, I still get that container starting up, going to unhealthy, then starting up again...
Portainer log screen gives the following:

 ::: Docker start setup complete
  [✗] DNS service is not running
  [i] Time until retry: 120
  [i] Time until retry: 120
  [i] Time until retry: 119
  [i] Time until retry: 118
...
  [[i] Time until retry: 3
  [i] Time until retry: 2
  [i] Time until retry: 1
  [✗] DNS resolution is not available
[cont-init.d] 20-start.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 01-resolver-resolv: applying... 
[fix-attrs.d] 01-resolver-resolv: exited 0.
[fix-attrs.d] done.

Contents of docker-compose.yml:


services:
  pihole:
    container_name: pihole
    image: pihole/pihole
    hostname: Pihole
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "67:67/udp"
      - "8080:80/tcp"
      - "443:443/tcp"
    environment:
      TZ: 'Europe/Brussels'
      WEBPASSWORD: 'apassword'
      - './etc-pihole/:/etc/pihole/'
      - './etc-dnsmasq.d/:/etc/dnsmasq.d/'
    cap_add:
      - NET_ADMIN
    restart: unless-stopped
    dns:
      - 127.0.0.1

Any idea what is wrong?

You shouldn't run pihole -up in a container, see Upgrading / Reconfiguring.

What version of Docker are you running?

For dockered Pi-holes, there is a current issue seemingly involving certain constellations of Docker versions and Pi-hole which is still under investigation.

You appear to be missing the volumes keyword here, but possibly a transient copy paste error.

Please try removing this part from the compose file and trying again

The volumes: keyword is there. To keep this topic short, I removed all comments in the my post, and by accident also the volumes: :upside_down_face:. But it is definitely there in yml file!

I tried with commenting out the

dns:
      - 127.0.0.1

but still the same.

In the log file there is line

  [✗] DNS service is not running

:thinking: :thinking:

Running Docker 20.10.5 on an Intel NUC with Ubuntu 20.04.2 LTS.
Gonna have a look at that issue.

Found a solution by adding 1.1.1.1 to dns:

    dns:
      - 1.1.1.1
      - 127.0.0.1

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.