As we add more and more docker containers, it becomes very cumbersome to keep track of updates to the containers we have and even forget to update those that are in the background.
There are several containers that do this job, such as watchtower, but in this case we’re going to use Ouroboros.
Ouroboros updates other containers to the latest version automatically so that we don’t have to do it ourselves. One of its advantages is that it is very easy to install and it hardly needs any configuration except for some specific cases. It is not necessary to create a folder linked to the container to save the data.
To install it, just run the following command via ssh:
docker run -d --name=Ouroboros --hostname=ouroboros --network=host --restart=always -v /var/run/docker.sock:/var/run/docker.sock -e CLEANUP=true -e TZ='Europe/Madrid' -e INTERVAL=300 pyouroboros/ouroboros:latest
As soon as we finish installing, we will have the container created in our docker application and it will start looking for updates.
In addition, Ouroboros includes in its code a service that allows us to receive notifications in telegram every time a container is updated. By including a couple of parameters in the Docker command, we would have it.
For example, we can create a Telegram Bot, get its API Token and Chat ID and add them to the command with the environment variable NOTIFIERS=”tgram://TU_API_TOKEN/TU_CHAT_ID/”.
docker run -d --name=Ouroboros --hostname=ouroboros --network=host --restart=always -v /var/run/docker.sock:/var/run/docker.sock -e CLEANUP=true -e TZ='Europe/Madrid' -e INTERVAL=300 -e NOTIFIERS="tgram://YOUR_API_TOKEN/YOUR_CHAT_ID/" pyouroboros/ouroboros:latest