watchtower icon indicating copy to clipboard operation
watchtower copied to clipboard

feat: add open container version to log messages

Open aauren opened this issue 1 year ago • 0 comments

What This PR Does

It adds the opencontainers image version to the update log if it exists on the container to give a better description of what the upgrade actually is.

As the issue that I linked below points out, org.opencontainers.image.version is a piloted standard to bring more consistency to container labels. All containers built via GitHub actions add them. Additionally, all containers from linuxserver contain them as well.

Related Issues

This is partially related to https://github.com/containrrr/watchtower/issues/1848

Although in that issue, they were asking that this information be added to watchtower's templating function. I don't actually use the templating function, so I didn't put it there, but I would imagine that making container labels available via the template functions would be a much larger PR.

Testing

I have been running with this setup for several days and it has worked great for me.

Example Output

Found new [lscr.io/linuxserver/nzbhydra2:latest](http://lscr.io/linuxserver/nzbhydra2:latest) image (fbeb6b7869e3 - v7.3.0-ls16)
Stopping /nzbhydra2 (387cd3eb4f70 - v7.2.3-ls15) with SIGTERM
Creating /nzbhydra2
Removing image ba50bb7dfb51

aauren avatar Jul 14 '24 17:07 aauren