0
0
mirror of https://github.com/renovatebot/renovate.git synced 2024-12-22 13:38:32 +00:00
renovatebot_renovate/lib/modules/versioning/docker
2024-08-19 13:15:27 +00:00
..
index.spec.ts refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
index.ts chore: eslint to enforce for typed imports (#30844) 2024-08-19 13:15:27 +00:00
readme.md docs(docker versioning): rewrite (#17097) 2022-08-12 18:34:46 +00:00

Docker images don't really have versions, instead they have "tags". Tags are often used by Docker image authors as a form of versioning.

Renovate tries to follow the most common conventions that are used to tag Docker images. In particular, Renovate treats the text after the first hyphen as a type of platform/compatibility indicator.

For example, many images have releases with the -alpine suffix. The official node Docker image has tags like 12.15.0-alpine which is not compatible with 12.15.0 or 12.15.0-stretch. Users on -alpine don't want updates to 12.16.0 or 12.16.0-stretch. Those users only want upgrades to 12.16.0-alpine and not 12.16.0 or 12.16.0-stretch.

Similarly, a user on 12.14 expects to be upgraded to 12.15 and not 12.15.0.

What type of versioning is used?

Docker image authors can use whatever tag they want, it's a "wild west". Docker tags don't always follow SemVer. This means that Renovate tries to accept and sort SemVer-like versions, but this won't always work.

You may need to help Renovate and create your own rules for some Docker images. For example:

{
  "packageRules": [
    {
      "matchDatasources": ["docker"],
      "matchPackageNames": ["badly-versioned-docker-image"],
      "versioning": "loose"
    }
  ]
}

Are ranges supported?

No. You may think a tag like 12.15 also means 12.15.x, but it's a tag of its own. The 12.15 tag may or may not point to any of the available 12.15.x tags, including 12.15.0.

Are commit hashes supported?

No, Renovate ignores Docker image tags that look like a Git commit hash.