How to keep docker daemon (service) to run without stopping unexpectedly

Check whether the Docker daemon responds to docker info. On a systemd host, the example uses cron to restart the service after a failed check.

TL;DR

I added a cronjob to check if the docker daemon is running or not -> if not then restart the service. It works like a champ and I never met the issue again.

* * * * * docker info > /dev/null || systemctl restart docker

Please note that the cronjob should belong to user that has permission to restart docker service, better run it with root user.

Related issue: https://github.com/docker/machine/issues/1458