docker-bind icon indicating copy to clipboard operation
docker-bind copied to clipboard

health_check

Open my1990 opened this issue 4 years ago • 1 comments

How to do health check? Is there an interface?

my1990 avatar Sep 07 '20 03:09 my1990

I added this to the Dockerfile

HEALTHCHECK CMD dig +norecurse +short +retry=0 @127.0.0.1 $TEST_HOST || exit 1

and then set the TEST_HOST variable on the container to a host name that bind should be able to resolve. If TEST_HOST is not set then dig returns the root servers.

Perhaps this can be adjusted to be of some use.

noel-jackson avatar Sep 10 '20 15:09 noel-jackson