dnsdock icon indicating copy to clipboard operation
dnsdock copied to clipboard

Container `HEALTHCHECK` Support

Open GAS85 opened this issue 2 months ago • 0 comments

Was wondering if there is any health check support could be implemented. Currently I have to mount nslookup, sh and few libraries to execute it.

    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      # Mount nslookup
      - /usr/bin/nslookup:/usr/bin/nslookup:ro
      # Mount sh to be able to execute nslookup from the healthcheck
      - /bin/sh:/bin/sh:ro
      # Needed libs
      - /lib:/lib:ro
      - /lib64:/lib64:ro
    ports:
      - "11053:53/udp" # Local Docker DNS
    labels:
      - autoheal=true
    healthcheck:
      test: nslookup somedomain 127.0.0.1
      interval: 5m
      timeout: 3s
      retries: 2

Any ideas how to improve it?

GAS85 avatar Oct 17 '25 13:10 GAS85