monstrenyatko / docker-watchdog

Scripts to restart Docker service and containers in case of Docker daemon failure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DOCKER WATCHDOG

About

This project contains scripts to restart Docker service and containers in case of Docker daemon failure.

Preconditions

Linux

  • Distribution with installed systemd
  • Docker daemon managed by the systemd

Python

  • Python 3

  • pip for Python 3

  • D-Bus library for Python 3

  • Additional Python packages:

    pip3 install -r requirements.txt

Usage

CRON

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

Logging

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.

About

Scripts to restart Docker service and containers in case of Docker daemon failure

License:MIT License


Languages

Language:Python 100.0%