I’m working on auto-updating my Docker Node in order to auto-updating (!) the Docker container when Unikname team releases a new version of UNS Core.
For this, I have chosen to use BF-Docker-Tools, which is easy to install (especially on Debian-like but also on other Linux distros), to use and compatible with my Docker-Compose installation.
With the following configuration, a daily update check of your Docker Compose containers will be done, and, if containers updates are available, your containers will be updated then automatically restarted.
For my part, updates are checked on a daily-basis for Sandbox and Livenet UNS containers, as an experiment.
To install the Docker Auto-Update tool, you may clone the git repository at GitHub. Then,
- move the
- move the
./etc/default/docker-updaterconfig file to
- update the setup in
/etc/default/docker-updater– at least set
If you’re using a Debian based system you may install the Docker-Tools through the provided apt-repository:
$ echo "deb http://apt.binfalse.de binfalse main" | sudo tee -a /etc/apt/sources.list.d/binfalse.list $ sudo gpg --recv-keys 08E66E72A83A9871CD493441E81BC3078D2DD9BD --keyserver pgp.mit.edu $ gpg --export 08E66E72A83A9871CD493441E81BC3078D2DD9BD | sudo apt-key add - $ apt update $ apt install bf-docker-tools
/etc/default/docker-updater and at least set
ENABLED=1 . This way, you’ll stay up-to-date with bug fixes etc.
Add your(s) Docker Compose config files in
/etc/docker-compose-auto-update.conf - one path to a
docker-compose.yml per line.
For eg., my
/etc/docker-compose-auto-update.conf file :
# line seperated list of docker-compose files, e.g. # /path/to/project/docker-compose.yml /home/uns/sandbox/docker-compose.yml /home/uns/livenet/docker-compose.yml
You can test your configuration:
$ sudo dupdate -v // -v is for more verbose
If your node auto-update, are you enslaved by Unikname team?
Even if my node is auto-updated, I still watch upgrades released by Unikname team, and if I disagree, I can roll back to the previous version of the container to reject the new upgrade.
Extra works will be interesting too:
- explain how to rollback to the previous container version
- receiving alerts when when my node is updated (UNS Node => Zapier => Email ? UNS Node => Zapier => Telegram/Signal ?)
- monitoring the state of my node (running, broken, (un)synchronized …)
That will be other topics later.
If you like this tuto and would like more of them, please vote for my individual @unikname
$ uns delegate:vote @MrFreez