Update
To keep a Debian/Ubuntu system up to date, we usually do something like this:
apt update
apt upgrade
apt full-upgrade
apt dist-upgrade
What about Docker containers?
Usually it is not convenient to do that kind of update/upgrade inside a docker container. What we do instead is:
-
pull an updated version of the base docker image
-
rebuild the local image (if needed)
-
rebuild the container
-
etc.
Most of docker-scripts applications can be updated just with a
ds make, which will rebuild the container, customize
automatically its configuration (if needed), and reuse the same data
and/or configs (which are stored on the directory of the container).
Some docker-scripts applications may be a bit different, or may
require additional steps. For example we may need to use ds
remake for some of them (instead of ds make), which usually
makes a backup of the application first, then rebuilds it (with
ds make), and finally restores the latest backup.
To automate the update of all the installed applications, it is
recommended to write a script, for example at
/var/ds/_scripts/update.sh, with all the required steps. It
depends on what applications you have installed, but it may look like
this:
The script /opt/docker-scripts/git.sh may look like this: