What's up docker? How to keep your containers up to date

Thanks!

So, if there is a new version then there will be an entry under the “new digest” column?

and while we’re here…

I’ve added the WUD_TRIGGER_MQTT_MOSQUITTO_HASS_ENABLED=“true” to my docker config and restarted but the integration isn’t being discovered.

WUD computes for you a boolean value to indicate whether there is an available update (toBeUpdated).
(this boolean value is also the value of the Binary Sensor’state)

Below some partial MQTT payload examples to better explain.

Example 1: You’re running mariadb:10.5.9 whereas the 10.6.0 is available on the Registry

{

   "toBeUpdated":true,
   "isSemver":true,
   
   "tag":"10.5.9",
   "digest":"sha256:a362c0e1cffc6530e43e96e8bdd73d5735f3b5a7f4e1ae04667cf7285ca1ee1a",

   "resultTag":"10.6.0",   

   ...
}

WUD reports that:

  • an update is available
  • it watches a semver version
  • the current running tag (10.5.9)
  • the current digest (a362...)
  • the greater tag found on the registry (10.6.0)

Example 2: You’re running mariadb:latest whereas the latest tag has been updated on the Registry

{

   "toBeUpdated":true,
   "isSemver":false,
   
   "tag":"latest",
   "digest":"sha256:0c0109b388d5a2b49159cfc84ef349261097968ef7143bd552cfa99297f215c5",

   "resultDigest":"sha256:dba1bb42f4796ac564e33f08393d09e17fc5cbf23a66155a395a81b825426f2a",
   
   ...
}

WUD reports that:

  • an update is available
  • it watches a non semver version
  • the current running tag (latest)
  • the current digest (0c01...)
  • the digest found on the registry for the latest tag which is different (dba1...)

Example 3: You’re running mariadb:latest on the same digest as the one on the Registry

{

   "toBeUpdated":false,
   "isSemver":false,
   
   "tag":"latest",
   "digest":"sha256:dba1bb42f4796ac564e33f08393d09e17fc5cbf23a66155a395a81b825426f2a",

   "resultDigest":"sha256:dba1bb42f4796ac564e33f08393d09e17fc5cbf23a66155a395a81b825426f2a",

   ...
}

WUD reports that:

  • no update is available
  • it watches a non semver version
  • the current running tag (latest)
  • the current digest (dba1...)
  • the digest found on the registry for the latest tag which is identical (dba1...)

I still need to polish the documentation to make it clear to everyone…

Hi @gmarlow ,

It wasn’t possible… until now :slight_smile:

You can give it a try by running the latest fmartinou/whats-up-docker:develop version.
The flag to enable is WUD_WATCHER_{watcher_name}_WATCHALL

The documentation is not yet published but you can find the draft here.

Example

WUD_WATCHER_LOCAL_WATCHALL="true"

Thanks for your feedback!

  1. Do you have any errors in the logs? (you can temporary set WUD_LOG_LEVEL="debug" for more verbosity)
  2. Can you take a look at the mqtt messages posted to the broker?

1 Like

Sorry, never mind…

I found the entities. I was confused about where to look. I thought there was supposed to be an actual “What’s Up Docker” integration. I didn’t realize it was subsumed under the MQTT integration.

I think it’s all working as expected now.

Thanks for the help. :+1:

1 Like

@finity @gmarlow @mwolter @eiri @leighcurran ,
Your feature requests are now officially available in version 4.0.0 :tada:
Please find the changelog here.

Feel free to ask me if you face any issue :wink:

3 Likes

I would like to try your docker. Wondering will it work with supervised version?

What do you mean by “supervised”?

If you can run any arbitrary container on a Docker daemon, then it will work.

Since you are running supervised you should have access to the OS and docker. So you can just run this directly in docker and the supervisor is irrelevant.

Using version 4.0.0. Shouldn’t all of the containers have a digest?

In my experiences if you are running the supervised version Watchtower will create a problem and making supervised unstable/unhealthy. So wondering if this can cause the same problem

I don’t know if you’re using Watchtower for notifications only (dry-run) or for automatic updates (which could lead to instability, for sure).

WUD only reports new versions; the process for updating is yours.
So you’re in total control and it shouldn’t lead to any instability by itself.

Oops…
It looks like that digest isn’t always at the same place in the image’s metadata :confused:
I think it depends on the way the image has been built, tagged and pushed
(multiarch images using buildx or not…).

I’m troubleshooting it and I hope pushing a quick fix for that.

Thanks for this app! I setup your 4.0.0 docker image, and have it publishing to MQTT for Home Assistant. It creates an entity per docker, as expected. I’m confused however. I have the latest version of HA, 2021.05.0, but it’s saying it needs to updated? That’s what I’m assuming “toBeUpdated: true” means?

watcher: docker.local
registry: hub
registryUrl: https://registry-1.docker.io/v2
image: homeassistant/home-assistant
digest: sha256:40f18f4877e686edef791bd32176890e325aae292c18368799cb53b4a84a3375
tag: 2021.5.0
versionDate: 2021-05-05T17:17:27.821095819Z
architecture: amd64
os: linux
size: 1098723823
isSemver: true
result: 
tag: 2021.6.0.dev20210429
digest: 'sha256:40f18f4877e686edef791bd32176890e325aae292c18368799cb53b4a84a3375'

created: 2021-05-06T16:00:00.297Z
updated: 2021-05-06T16:00:00.297Z
toBeUpdated: true
resultTag: 2021.6.0.dev20210429
resultDigest: sha256:40f18f4877e686edef791bd32176890e325aae292c18368799cb53b4a84a3375
friendly_name: wud_image_hub_homeassistant_home-assistant
icon: mdi:docker

Is that because it’s seeing dev versions and thinking I need to upgrade to them? If so, I wonder if there’s a way we could exclude tags which have ‘dev’ or ‘nightly’ or similar things?

Thanks!

Hi @moralsnipe welcome on board! :slight_smile:

Yes, you can!
You can finely adjust eligible tags by using include/exclude regex.
Please find here the official documentation

A working example for home-assistant would be

version: '3'

services:
    homeassistant:
        image: homeassistant/home-assistant:2021.5.0
        ...
        labels:
            - 'wud.tag.include=^([0-9]\d*)\.([0-9]\d*)\.([0-9]\d*)$$'

Woo! That’s awesome. I missed that. Is there a way to set that via an environment variable in the container? Currently attempting to do all config vial env vars, to not need any stored state.

Whoops! I re-read the docs. Now I see. The label goes on my HA container. Okay, I get it now.

The feature is only based on Docker labels.

I don’t really see your point regarding “storing a state”.
Labels and env vars can be both based on file descriptors (docker-compose file or in bash script or …)

IMHO, labels are interesting because of 2 things:

  1. They allow to distributed the configuration over every container to watch instead of centralizing all the config on a single point (wud)
  2. They allow to add metadata on every container in a non-intrusive way (at the contrary of env vars which can be read by the underlying container)

It’s a very common practice (for example Traefik intensively relies on them)

Cross-post… never mind:)

1 Like

It’s fixed with version 4.0.1