whats-up-docker icon indicating copy to clipboard operation
whats-up-docker copied to clipboard

Feature tags

Open Tyrian81 opened this issue 2 years ago • 8 comments

Is there a possibility to add a function in WUD to simplify the tags to watch ? adding labels/strings to all compose files is a pain and a drawback.

Tyrian81 avatar Mar 24 '22 11:03 Tyrian81

Hi @Tyrian81

I disagree with the statement "adding labels/strings to all compose files is a pain and a drawback".

Lots of Docker-based automation tools work that way (Traefik, Ofelia...)

For me, setting container customization per container instead of keeping 1 centralized configuration is a key feature. Besides that, setting the configuration in descriptive files (as docker-compose.yml files are) allow you to track your changes over time (using git history for example).

We probably work in a different way so we probably have different needs; I'm interesting in understanding the way you work. Could you explain how do you work and what the feature you have in mind would look like?

fmartinou avatar Apr 02 '22 09:04 fmartinou

Well as a beginner, I'm not familiar with semver versioning or adding/creating regex strings.

Would be nice to have like a dropdown menu in WUD web interface to have wud watch only :latest or major releases. haven't touched my compose files yet to add labels, because a bit concerned about adding wrong regex, so it wont look for updates at all... and also running 50 containers a bit of a hassle to ssh , vim , edit all....

Also have watchtower installed to auto-update, this only watches major releases i believe. When HA supervised is installed with add-ons, also only looks for major releases i believe.

Just a thought , but I believe for a beginner it would simplify things, if there would be a possibility like this.

Tyrian81 avatar Apr 02 '22 09:04 Tyrian81

Hi,

watchtower installed to auto-update, this only watches major releases i believe.

For information, Watchtower doesn't know anything about semver (for example it doesn't know that 2.1 is greater than 2.0). It only works with image tags which are overwritten in the registry (for example latest).

So every time it detects that layers of the latest tag in the Registry are different from layers of your latest local image, it will pull the new layers and replace your existing container (regardless if it's a patch, minor or major version).

That's mainly why I've created WUD 😉.

fmartinou avatar Apr 02 '22 10:04 fmartinou

I want WUD to watch only for final/major releases

For example WUD thinks there's an update for Frigate NVR: Image tag value: 0.10.1-amd64 , Update kind remote value: cleanup_events-6877432-amd64 (don't even know what this cleanup_events tag is) and for UptimeKuma: Image tag value: 1 Update kind remote value: nightly-amd64 (this one has a strange :1 tag)

So the best way for these are to make regex label strings in compose , i wouldn't know how to string these ?

Tyrian81 avatar Apr 07 '22 13:04 Tyrian81

When my frigate crashed, I was left with a running container named similar to your cleanup_events-######-amd64. Just stop it and it should go away. UptimeKuma does have a :1 tag, it's not strange at all.

After having a bad experience pulling an image using the :latest tag, I am now convinced that using semver tags is the way to go. For stuff that I can be without for a few days, :latest is fine, but for things like my password manager or frigate, I cannot afford to be down again.

Take a look at the examples @fmartinou has created, he has a number of different labels. A good way resource for learning regex is RegExr.

This might not be the tool for you if all you want to check for is :latest tags; continue using watchtower or look at DIUN.

advisorgee avatar Apr 14 '22 06:04 advisorgee

Thank your for your post @advisorgee ; I'm happy to see that I'm not the only man on earth thinking that way 😅

@Tyrian81 I get your point and I'm going to think of a solution to help users configure WUD.

In the meantime, for your Frigate & uptime-kuma containers, you could set:

version: '3'

services:

  frigate:
    image: blakeblackshear/frigate:0.10.1-amd64
    labels:
      - wud.tag.include=^\d+\.\d+\.\d+-amd64$$

  uptime_kuma:
    image: louislam/uptime-kuma:1
    labels:
      - wud.tag.include=^\d+$$

N.B. 1 If you still want to live with mutable latest images, you have the possibility to track them with wud.

You just have to run your containers with the latest tag and anytime the hash of the tag will change on the registry, you'll be notified).

N.B. 2 If you want auto-updates (for example replacing your latest version by the new latest version), you can also do it with wud by using the Docker trigger or the Docker-compose trigger

fmartinou avatar Apr 20 '22 16:04 fmartinou

Not sure if this belongs to this ticket but sounds a bit like the same.

I would love to see if its possible to define the following part on the whats up docker container level:

- wud.tag.include=^\d+\.\d+\.\d+-\d+-.*$$
- wud.tag.transform=^(\d+\.\d+\.\d+-\d+)-.*$$ => $$1

(indicate that you want to watch x.y.z versions only)

Because I hope that all my docker containers works like with this pattern I want to avoid to go to every container and add this kind of snippet all over again. (Of course if a docker container doesn't follow this pattern I will never notice any updates - But i guess this issue is with every regex pattern you define).

Would be cool if you could define this as a "default" and of course you can then fine tune this on each docker container.

tobidemski avatar Oct 10 '22 21:10 tobidemski

Hi @tobidemski

Yes, that would be a great feature 👍 ! Being able to set default global configuration at the wud container level and being able to override per container using label.

=> I add it to my todo list.

fmartinou avatar Oct 15 '22 11:10 fmartinou