My home network is powered by a few Docker Hosts, whilst the Lab runs Hyper-V.
Keeping things up to date is important, especially when you’re running a number of services that are open out to the internet (even secured via a reverse proxy). Whilst I could manually go into each host and re-build the containers, I could easily use a small container called Watchtower that keeps an eye on container registries and rebuilds containers when a newer image is detected.
For my example below, we’ll be assuming that you’re based in Melbourne Australia and want an update at around 2 AM local time, feel free to update both entries to suit your needs.
docker run -d \
--name watchtower \
-v /var/run/docker.sock:/var/run/docker.sock \
-e WATCHTOWER_SCHEDULE="0 0 2 * * *" \
-e TZ="Australia/Melbourne" \
ghcr.io/nicholas-fedor/watchtower
We push the update time via a CRON schedule environment variable called WATCHTOWER_SCHEDULE and then ensure that the container is aware of our time zone with the TZ environment variable.
Once it’s up and running it should keep your images up to date – be mindful of major upgrades, recently Immich (which is a great self-hosted image manager) had a major database upgrade which meant I had to make a number of changes before it booted.

Leave a Reply