Install Watchtower

Install Watchtower

docker run -d --name=watchtower \
-v /volume1/docker/docker.sock:/var/run/docker.sock \
--restart=always \
containrrr/watchtower --cleanup --include-stopped --include-restarting --interval 21600

Watchtower updates your containers automatically without asking. For some, this is very useful, but for others who have to work with a container all the time, less so.

That’s why there is also an option to always run Watchtower manually instead of automatically. You can find all of these options in the documentation.

Here is an example of a manual update of Calibre:

docker run --rm \
-v /volume1/docker/docker.sock:/var/run/docker.sock \
containrrr/watchtower \
--run-once calibre

docker run –rm creates the Watchtower container, runs it and when it is finished, it is automatically deleted.

Create symbolic link for docker.sock

ln -s /var/run/docker.sock /volume1/docker/docker.sock

I am creating this symbolic link because I was having problems with some containers accessing docker.sock. When I linked them like this, those containers no longer had any problems and ran perfectly.

Watchtower Documentation

0 0 votes
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments