Docker image that runs a script whenever a specific container becomes unhealthy
2.9K
https://github.com/ericm/healscript
This is a Docker image that runs a script whenever a specific container becomes unhealthy.
It maps to scripts in the /scripts directory and if an image X is found to be unhealthy, it will run /scripts/X.sh
docker run -it \
-v /path/to/scripts:/scripts \
-v /var/run/docker.sock:/var/run/docker.sock \
moynihan/healscript:latest
version: "3"
services:
healscript:
image: moynihan/healscript:latest
volumes:
- /path/to/scripts:/scripts
- /var/run/docker.sock:/var/run/docker.sock
# /script/X.sh
docker logs Y
docker restart X Y Z
moynihan/healscript:{latest|x86_64}
moynihan/healscript:armhf
Content type
Image
Digest
Size
59.8 MB
Last updated
over 6 years ago
docker pull moynihan/healscript