I have a private registry where I have published images with non-semver tags (dev, preprod, prod tags). I configured the containers that reference these images with the following labels. Here is an exerpt from the ansible tasks that set this up:
- name: Install NAME
community.docker.docker_container:
name: NAME
image: "{{docker_registry}}/NAME/NAME:dev"
state: present
restart_policy: unless-stopped
labels:
wud.watch.digest: "true"
Regardless of what tags I set in the registry, it appears wud does not detect that the tag has changed and does not update the corresponding container.
Instead, I would have expected to see you access the RepoDigests field returned by inspect, split it at the @ character, and return the right-hand side. I am not very familiar with all the possible behaviors of docker and the semantics of Config.Image but this looks suspicious. I would be happy to put together a PR if you feel it makes sense.
I have a private registry where I have published images with non-semver tags (dev, preprod, prod tags). I configured the containers that reference these images with the following labels. Here is an exerpt from the ansible tasks that set this up:
wud is configured via ansible too:
Regardless of what tags I set in the registry, it appears wud does not detect that the tag has changed and does not update the corresponding container.
I got a bit curious so, as you can see, I enabled debug logging. I also added my own debugging statements in wud. The lack of any update appears to be caused by the else statement in https://github.com/fmartinou/whats-up-docker/blob/master/app/watchers/providers/docker/Docker.js#L516 that sets container.image.digest.value to an empty value (image.Config.Image is empty) which leads this to never be true.
So, I spent time reading: ./watchers/providers/docker/Docker.js:findNewVersion
Specifically, the else statement in https://github.com/fmartinou/whats-up-docker/blob/master/app/watchers/providers/docker/Docker.js#L516 fumbles me: you want to get the digest of the locally-running image so you look at the content of Config.Image but really neither the docker documentation nor my own experiments hint that there could be anything relevant in here.
Instead, I would have expected to see you access the RepoDigests field returned by inspect, split it at the @ character, and return the right-hand side. I am not very familiar with all the possible behaviors of docker and the semantics of Config.Image but this looks suspicious. I would be happy to put together a PR if you feel it makes sense.