Interview Prep/Docker/Daemon, install and permissions

After reboot, containers don't come back though `--restart always` was set.

IntermediateTroubleshootingDaemon, install and permissions
Answer

Likely causes → docker service not enabled at boot, containers were created before the policy was set, or they were stopped manually with unless-stopped.

Diagnose →

systemctl is-enabled docker
docker inspect -f '{{.HostConfig.RestartPolicy}}' c
journalctl -u docker -b | grep -i restart

Fix → systemctl enable docker; docker update --restart unless-stopped c.

Prevent → Define policies in Compose files and test a reboot.

All Docker questions Roadmap: Docker & containers

More on Daemon, install and permissions