I’m running AIO on Ubuntu. What is the proper way to keep Ubuntu updated? Should I just run apt update && apt upgrade && reboot or should I hold docker related apps and reboot or should I upgrade then stop docker then reboot or stop docker then upgrade && reboot? (Sorry if the “ncp” tag doesn’t fit, I couldn’t find a tag that made sense.)
It should not be necessary to stop containers. When shutting down, the Docker daemon already takes care of this, and the same applies when updating.
Not to much info so my little proposal
search for unattended-upgrades
That’s how I do it on my instance:
-
Install needrestart
sudo apt install needrestart
-
Upgrade your system
sudo apt update && sudo apt full-upgrade
-
After the packages were updated, needrestart will show you a list with all services that need to be restarted. Just hit ENTER and it will restart them automatically for you. (It can also be configured to do this automatically without a promt)
It will also tell you if a reboot of your system is needed, e.g. after a kernel update.
-
If a reboot is needed, just reboot. There’s no need to stop any containers or services manually.
If you want to fully or partially automate this process, look into unattended-upgrades
, as @geoW suggested, which can also be used in combination with needrestart. So, not sure if I would recommend it, but in theory, you could configure your system to do upgrades fully automatically, including automatic reboots after a kernel update.
Fantastic!
Thank you for the replies.