Public Repository

Last pushed: 2 years ago
Short Description
Restart unhealthy containers based on healthchecks
Full Description

Monitors docker events and restarts unhealthy containers.

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


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" \
Monitored container label options
label type default description
com.github.mcasimir.autoheal.check.cmd string Healthcheck command executed on the container
com.github.mcasimir.autoheal.check.grace number 15000 Grace period (in milliseconds) between last container start/restart and first healthcheck
com.github.mcasimir.autoheal.check.frequency number 5000 Healthcheck frequency (in milliseconds)
Docker Pull Command