I’m trying to find the best/proper way to handle docker when restarting my server for dnf upgrades.
At the moment I just do sudo shutdown -r (now)
But I’ve noticed that docker doesn’t seem to gracefully stop containers (as in the server just restarts without the docker containers saves databases etc)
should I be doing `sudo systemctl stop docker’ first
and then run ‘sudo shutdown -r (now)’?
I use podman and not docker itself for my containers and I think podman knows how to handle shutdown. But I almost always stop my VMs before I shutdown.
You could use podman instead of docker if that’s possible for your use case.
You could review the podman service files to see what they implement for shutdown.