renovatebot / renovate

Home of the Renovate CLI: Cross-platform Dependency Automation by Mend.io
https://mend.io/renovate
GNU Affero General Public License v3.0
17.27k stars 2.26k forks source link

Support rolling docker tags (like bitnami use) #9155

Closed viceice closed 1 week ago

viceice commented 3 years ago

What would you like Renovate to be able to do?

Support updating 3.4.6-debian-9-r24 docker tags

https://docs.bitnami.com/tutorials/understand-rolling-tags-containers/

Current workaround is to use allowedVersions regex filter and loose versioning.

ref bitnami/charts#5793

Did you already have any implementation ideas?

rarkins commented 3 years ago

Maybe a new type of versioning is necessary to treat the two halves as separate versions? Or could we do it during extract and essentially extract the same dep twice, with two different extractVersion approaches?

viceice commented 3 years ago

I think this is a more genral version of #4860 4 part versioning

rarkins commented 3 years ago

Would you want to update debian versions independently of bitnami versions though?

e.g. if you're on 3.4.6-debian-9-r2 and there's also 3.4.7-debian-9-r2, 3.4.6-debian-10-r1 and 3.4.6-debian-9-r3 and 3.4.7-debian-10-r1 then which PRs to propose and what type of update are they?

viceice commented 3 years ago

As far as i know:

I also updated issue description

mcritchlow commented 3 years ago

@viceice - would you be open to sharing the regex setup you're currently using as a workaround?

Current workaround is to use allowedVersions regex filter and loose versioning.

We're stuck on this issue as well.

viceice commented 3 years ago

No, i didn't got it working properly, so went back to short tags and digest pinning.

mcritchlow commented 3 years ago

Oh well, appreciated nonetheless :) Hopefully this gets in at some point.

mcritchlow commented 2 years ago

After the recent security issues, such as log4j, I thought I might bump this and ask if there might be some consideration for prioritizing this strategy bitnami uses which keeps images patched regularly and explicitly. I also recognize that this rolling tag strategy may be unique to Bitnami's images, so perhaps the value proposition is questionable for maintainers. Though #4860 does seem related, if not completely identical.

viceice commented 2 years ago

https://github.com/visualon/renovate-config/blob/main/shared.json#L110-L115

This is what i successfully use

    {
      "description": "Use custom regex versioning for bitnami images",
      "matchPackagePrefixes": ["gcr.io/bitnami-containers/", "bitnami/"],
      "matchDatasources": ["docker"],
      "versioning": "regex:^(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)(:?-(?<compatibility>.*-r)(?<build>\\d+))?$"
    },
mcritchlow commented 2 years ago

@viceice - wow, that's great. Thanks! I'll give it a shot with some of our projects.

rarkins commented 1 year ago

After #24717 maybe we can introduce the concept of updating compatibility like versions too

cospeedster commented 3 months ago

We've a similar problem with fluentd images. I will share a code snippet if we get it working.

cospeedster commented 3 months ago

This seems to work for us:

{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "packageRules": [
    {
      "matchDatasources": ["docker"],
      "matchPackageNames": ["fluent/fluentd"],
      "versioning": "regex:^v?(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)((?<compatibility>-.*-?)?(?<build>\\d+\\.\\d+))?$"
    }
  ]
}
cospeedster commented 1 week ago

Isn't this handled by workarounds:bitnamiDockerImageVersioning?