Sign inSign up

mcasimir/docker-autoheal

By mcasimir

•Updated about 10 years ago

Restart unhealthy containers based on healthchecks

Image
Artifact
2

1.4K

mcasimir/docker-autoheal repository overview

Monitors docker events and restarts unhealthy containers.

The healthiness of the container is assessed through configurable healthcheck commands.

⁠Usage
⁠Start the monitor
docker run -d -v /var/run/docker.sock:/var/run/docker.sock mcasimir/docker-autoheal
⁠Start your container

Starts your containers with some labels to enable the autoheal:

docker run \
  -l com.github.mcasimir.autoheal.check.cmd="curl -f -I --connect-timeout 1 -X HEAD http://127.0.0.1:3000" \
  my-container-image
⁠Monitored container label options
labeltypedefaultdescription
com.github.mcasimir.autoheal.check.cmdstringHealthcheck command executed on the container
com.github.mcasimir.autoheal.check.gracenumber15000Grace period (in milliseconds) between last container start/restart and first healthcheck
com.github.mcasimir.autoheal.check.frequencynumber5000Healthcheck frequency (in milliseconds)

Tag summary

Content type

Unrecognized

Digest

Size

16.5 MB

Last updated

about 10 years ago

docker pull mcasimir/docker-autoheal