Ubuntu docker not updating automatically

Since I started running Ubuntu through docker it is not updating automatically. I tried following the instructions on “Software Updates, automatic update page”, but still it is not updating automatically. I have to do it manually. On that instruction it say that by running the command docker ps -a, it would show “storjlabs/watchtower:latest”, however mine only shows this “storjlabs/watchtower” there is no “:latest”. What am I missing? Please help. thank you.

Can you show the watchtower command and result of docker ps -a ?

Also show the watchtower command you are using

defaults to storjlabs/watchtower:latest

Ubuntu never just updates docker. Not sure why, haven’t researched but my guess it that it would disrupt operations too much if you’re not running a swarm. If my docker updates and restarts all containers, I have way too much IOwait, so it would be a problem. I need to update/restart my nodes one after the other (has finished the filewalker process after starting the node).

I followed whatever the instructions at this page: https://documentation.storj.io/setup/cli/software-updates.

  1. docker pull storjlabs/watchtower
    2 . docker run -d --restart=always --name watchtower -v /var/run/docker.sock:/var/run/docker.sock storjlabs/watchtower storagenode watchtower --stop-timeout 300s

I am currently running just one node on this hardware.

ah so you are wondering about the node getting updated, not docker itself… ok. that’s something different, sorry.

You called your SN storagenode1 so you need to stop and remove your watchtower (and you could remove your hello world crufts too) and run the watchtower with storagenode1 and watchtower as the params.
Or you could post your watchtower start command so that I don’t have to guess.

You had the right idea but you didnt put the right container name for you watchtower it will never update.

docker run -d --restart=always --name watchtower -v /var/run/docker.sock:/var/run/docker.sock storjlabs/watchtower storagenode1 watchtower --stop-timeout 300s

Theres how it should look.
You should run

docker stop watchtower
docker rm watchtower

Then re run the command again.

1 Like

Oh, I see, I think you are right, that’s what I missed. I will try to do that. Thanks.

I tried it, and this is what it is now when I run docker ps -a. It still not showing “storjlabs/watchtower:latest”

I suppose it depends on how it’s installed? With apt, whether I’m using docker.io or docker-ce, updates definitely come through with apt updates and I need to watch for new docker packages so I bring down all my docker-compose stacks manually prior to updating docker.

You will have to wait for watchtower to update it, its not instant update.

yes with apt upgrade it installs for me too and I have to be careful when running that command but it doesnt update automatically with the automatic security updates in background (I guess unless there is a security relevant docker update? but never seen that…).

Right, I understand what you mean. That’s correct that docker doesn’t update automatically with unattended-upgrades. Aside: for a while I ran a local Landscape server that did auto apt updates across my servers and (at the time) LXC containers. Definitely had some surprise downtime every now and then with that approach, haha.