Renovate: Support for weird Docker tags

Created on 28 Aug 2018  ·  11Comments  ·  Source: renovatebot/renovate

What would you like Renovate to be able to do?

I use Renovate to update Docker image tags in my Kubernetes manifests. One piece of software I use is Minio, which has a weird tagging scheme and no real versioning. The tags look like RELEASE.2018-08-25T01-56-38Z. I'd like some way for Renovate to update those, still.

Describe the solution you'd like

Obviously no semantic meaning can be attached to these tags. What I imagine might work is Renovate getting all the available tags from the Docker registry, and just treating any tags that are newer as updates.

Describe alternatives you've considered

  • Minio could adopt a versioning scheme, but they explicitly said they will not
  • Just use the latest tag and rely solely on digest pinning. While that'd be better than no updates, directly available information about the version (to look up release notes and what not) would be lost.

Additional context

priority-4-low feature

Most helpful comment

treating any tags that are newer as updates.

This one is a little challenging, because they also have an edge tag which is currently newest and we'd probably want to avoid that landmine.

In theory we could write something like timestampVer as an alternative to semver, with Minio as the one/only user to start with. Looks like they follow ISO 8601 format, so we could do something like:

  1. Split the tag by '.' and take the last chunk (hence works also if the tag is a pure timestamp)
  2. See if we can parse it as ISO 8601
  3. If so then declare it as timestampVer and write a few functions to support it (e.g. isGreaterThan(), etc.

All 11 comments

Maybe Renovate could make digest pinning for the latest tag more useful if the PR body listed other tags that point to the digest, to show “version numbers”?

treating any tags that are newer as updates.

This one is a little challenging, because they also have an edge tag which is currently newest and we'd probably want to avoid that landmine.

In theory we could write something like timestampVer as an alternative to semver, with Minio as the one/only user to start with. Looks like they follow ISO 8601 format, so we could do something like:

  1. Split the tag by '.' and take the last chunk (hence works also if the tag is a pure timestamp)
  2. See if we can parse it as ISO 8601
  3. If so then declare it as timestampVer and write a few functions to support it (e.g. isGreaterThan(), etc.

versionScheme can be configurable via packageRules now, so someone could write a custom versionScheme and apply it selectively that way.

Sample for gitlab-ce and gitlab-runner

{
    packageRules: [
        {
            packageNames: ["gitlab/gitlab-runner"],
            versionScheme: "regex:^(?<compatibility>.*)-v(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)?$",
            groupName: "gitlab docker images",
        },
        {
            packageNames: ["gitlab/gitlab-ce"],
            versionScheme: "regex:^(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)-(?<compatibility>ce\\.\\d+)$",
            groupName: "gitlab docker images",
        },
    ],
}

image

I think we should create a docker:* preset - included with config:base - which collects all the customisation a we’ve discovered and that we think are applicable to everyone.

@mxey have you tried out loose or regex versioning could work for minio tags now?

@rarkins

loose does not work: Dependency minio/minio has unsupported value RELEASE.2020-02-07T23-28-16Z

For regex, I cannot make it work because AFAICT it expects each capture group to be only a number. RELEASE.2020-02-07T23-28-16Z contains 6 numbers. I think it would make the most sense to have the whole thing treated as a major version. But for that is has to be sorted as a string, similar to how I believe loose already works?

Using this package rule

        {
            "packageNames": ["minio/minio"],
            "versioning": "regex:^RELEASE\\.(?<major>.*)$",
        }

I get an error Invalid Version: NaN.0.0

Also something that can work with latest tag would be great..

Latest images can be referenced like ( digest ): nginx:latest@sha256:3936fb3946790d711a68c58be93628e43cbca72439079e16d154b5db216b58da

Just replace never image with same tag. ( Maybe decoding that digest can bring more information https://docs.docker.com/registry/spec/api/#content-digests ).

Tools ( Docker ) like https://github.com/pyouroboros/ouroboros and https://github.com/containrrr/watchtower does same thing, its has quite large userbase so I thing it may work.

@lukasmrtvy can you give an example? Renovate already updates digests for latest

Its working, You are right. Sry about confusion.

I'm a happy camper with this regex for minio:

    {
      "packagePatterns": ["^minio"],
      "versioning": "regex:^RELEASE\\.(?<major>\\d{4})-(?<minor>\\d{2})-(?<patch>\\d{2})"
    }
Was this page helpful?
0 / 5 - 0 ratings