Keep in sync the alpine image with the renovate repology datasource #24758
Replies: 3 comments 3 replies
|
Hi there, Get your issue fixed faster by creating a minimal reproduction. This means a repository dedicated to reproducing this issue with the minimal dependencies and config possible. Before we start working on your issue we need to know exactly what's causing the current behavior. A minimal reproduction helps us with this. To get started, please read our guide on creating a minimal reproduction. We may close the issue if you, or someone else, haven't created a minimal reproduction within two weeks. If you need more time, or are stuck, please ask for help or more time in a comment. Good luck, The Renovate team |
|
I'd propose resolving |
|
I was searching for the same thing today, the workaround that I'm using is like this, I add a new "customManagers": [
{
"description": "Update `alpine` repology",
"customType": "regex",
"fileMatch": "^build.env$",
"matchStrings": [
" renovate: dependency=alpine_(?<currentValue>(?<major>\\d+)_(?<minor>\\d+))/"
],
"depNameTemplate": "docker.io/alpine",
"datasourceTemplate": "docker",
"versioningTemplate": "docker",
"autoReplaceStringTemplate": " renovate: dependency=alpine_{{{replace '\\.' '_' newValue}}}/",
"currentValueTemplate": "{{{major}}}.{{{minor}}}"
}
]And the file that contains the versions is like this: # renovate: dependency=docker.io/alpine datasource=docker versioning=docker
ALPINE_VERSION="3.21.2@sha256:56fa17d2a7e7f168a043a2712e63aed1f8543aeafdcee47c58dcffe38ed51099"
# renovate: dependency=krallin/tini
TINI_VERSION="v0.19.0"
# renovate: dependency=alpine_3_21/gcc datasource=repology versioning=loose
GCC_VERSION="14.2.0-r4"
# renovate: dependency=alpine_3_21/icu datasource=repology versioning=loose
ICU_VERSION="74.2-r0"
# renovate: dependency=alpine_3_21/sqlite datasource=repology versioning=loose
SQLITE_VERSION="3.47.1-r0"When there's an update, I got diff file like this: # renovate: dependency=docker.io/alpine datasource=docker versioning=docker
ALPINE_VERSION="3.22.1@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1"
# renovate: dependency=krallin/tini
TINI_VERSION="v0.19.0"
# renovate: dependency=alpine_3_22/gcc datasource=repology versioning=loose
GCC_VERSION="14.2.0-r4"
# renovate: dependency=alpine_3_22/icu datasource=repology versioning=loose
ICU_VERSION="74.2-r0"
# renovate: dependency=alpine_3_22/sqlite datasource=repology versioning=loose
SQLITE_VERSION="3.47.1-r0"Then I manually fix the alpine packages version by checking in In case there's future updates of alpine packages, I group them together: "packageRules": [
{
"groupName": "`alpine packages`",
"matchDatasources": [
"repology"
],
"matchPackageNames": [
"alpine_*/*"
]
}
]If anyone has a better way, please let me know. |




Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
What would you like Renovate to be able to do?
Some of our docker images are based on an Alpine Linux version, like here:
FROM docker-upstream.artifactory.ourhostnetwork.net/postgres:11.17-alpine3.16 as upstreamIn order to update alpine packages with renovate, we did this:
We would like to keep the "3.16" bit from the image tag ("postgres:11.17-alpine3.16") in sync with the depname "alpine_3_16" bit ("depName=alpine_3_16/python3-dev").
Also, this would be useful as well in our "--repository" flag, passed to the apk command:
If you have any ideas on how this should be implemented, please tell us here.
A possible idea is to have an output variable of some kind, that can be configured in the renovate.json.
E.g.
COMPATIBILITY_OS_VERSION, which forpostgres:11.17-alpine3.16will return3.16.The depName in the renovate comments would be automatically updated to "alpine_3_16".
Is this a feature you are interested in implementing yourself?
No
All reactions