This project contains scripts to restart Docker service and containers in case of Docker
daemon failure.
- Distribution with installed systemd
Docker
daemon managed by thesystemd
-
Python
3
-
pip for
Python 3
-
D-Bus
library forPython 3
-
Additional
Python
packages:pip3 install -r requirements.txt
Execute every 30 minutes using crontab
.
Edit root
crontab
:
sudo crontab -e
Add new line like:
*/30 * * * * /root/bin/docker-watchdog/daemon_monitor.py > /dev/null 2>&1
Logs are sent to the syslog
daemon
facility using UDP
connection.
Please ensure the syslog
service is listening the UDP
514
port on the localhost
.