For Ubuntu & docker, I do these commands (one by one) :
apt-get update && apt-get upgrade
apt-get dist-upgrade
sudo apt-get upgrade docker-engine
After that a little cleanup
apt-get autoremove && apt-get autoclean
And to finish this, a simple
reboot
And it will be fresh and clean
You can configure automatic updates, but I don’t know if it’s the best option :
dpkg-reconfigure -plow unattended-upgrades