Docker exited for no apparent reason and I'm trying to understand what happened.
Right now the docker daemon is a loaded service, inactive with an exit status 0 SUCCESS.
$ systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Tue 2020-12-01 06:25:16 UTC;
Docs: https://docs.docker.com
Main PID: 2218 (code=exited, status=0/SUCCESS)
Looking at the docker logs, this happened because it processed signal 'terminated':
$ journalctl -u docker.service | tail -25
Nov 30 18:30:21 ip-10-38-4-210 dockerd[2218]: time="2020-11-30T18:30:21.728694550Z" <redacted irrelevant>
Dec 01 06:25:05 ip-10-38-4-210 systemd[1]: Stopping Docker Application Container Engine...
Dec 01 06:25:05 ip-10-38-4-210 dockerd[2218]: time="2020-12-01T06:25:05.867748396Z" level=info msg="Processing signal 'terminated'"
Dec 01 06:25:16 ip-10-38-4-210 systemd[1]: Stopped Docker Application Container Engine.
No user was logged in on that host at that time, no user explicitly terminated the docker daemon.
- Why is this happening, what logs could provide a clue?
- Can I configure dockerd to restart automatically upon exits?
This is Docker version 18.09.7 (build 2d0083d) on Ubuntu 16.04.6 LTS on x86-64.
The relationship with systemd is being asked on Unix.stackexchange here
grep -E 'docker|containerd' /var/log/dpkg.log