Skip to content

PoC on renovate creating PR for only LTS versions of node for dockerfiles

License

Notifications You must be signed in to change notification settings

Rochet2/renovate-node-lts-docker

Repository files navigation

renovate-node-lts-docker

It appears that adding the following package rule to renovate.json makes Dockerfile node image follow LTS versions of node even if there is no explicit mention of it. Without this, the node version is updated to latest version instead of LTS.

Additionally, renovate does not support docker image suffixes yet. See this. To support image names like node:18.0-alpine, we use versionCompatibility to define how the version with suffix should be parsed. The versionCompatibility is not necessarily needed if the image version does not use any suffix.

  "packageRules": [
    {
      "matchDatasources": ["docker"],
      "matchPackageNames": ["node"],
      "versionCompatibility": "^(?<version>[^-]+)(?<compatibility>-.*)?$",
      "versioning": "node"
    }
  ]

About

PoC on renovate creating PR for only LTS versions of node for dockerfiles

Topics

Resources

License

Stars

Watchers

Forks