Why did Docker get stopped on unattended upgrades
The Docker daemon gets stopped and not restarted after unattended upgrades.
Is this normal?
Im using Ubuntu Ubuntu 18.04.5 LTS
Dec 01 06:39:19 systemd[1]: Starting Daily apt upgrade and clean activities...
Dec 01 06:39:26 systemd[1]: Stopping Docker Application Container Engine...
Solution 1:
Ubuntu has a hidden auto-upgrade program, and it sometimes crashes your system by terminating docker. (My server went down for 5 hours because of this issue)
To fix this bug, just disable apt-daily-upgrade.timer.service
on all your ubuntu servers. Usually, even without this bug, we don't want slient upgrade which may cause service interruption.
sudo systemctl disable --now apt-daily-upgrade.timer
Ref: https://arun.nz/why-does-docker-restart-all-containers-regularly/
Solution 2:
There is a bug in Ubuntu which caused this shutdown of dockerd. It occurred because of an automatic security update of containerd. See also https://serverfault.com/questions/1044493/how-to-make-sure-docker-service-will-start-after-containerd-upgrade.
The previously accepted answer disables the automatic security updates, so be aware of the consequences.