Using the correct digest for a docker image with an override #43480
-
How are you running Renovate?A Mend.io-hosted app Which platform you running Renovate on?GitHub.com Which version of Renovate are you using?43.186.8 Please tell us more about your question or problemI am using the {
"packageRules": [
...
{
"matchPackageNames": ["ghcr.io/pnpm/pnpm"],
"matchDatasources": ["docker"],
"overrideDatasource": "npm",
"overridePackageName": "pnpm"
}
]
}This does delay the creation of the PR for the pnpm docker image. What it then fails to do is gather the correct digest for the pnpm docker image because it is no longer pointing at the correct datasource. Is there some hack I could use to use one datasource as the trigger and then collect the specifics of the docker image version from another datasource? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
I don't think there is a clean way to do this with one dependency entry.
So the missing piece would be something like separate "version datasource" and "artifact/digest datasource" support. Renovate does not currently model Docker updates that way. The practical options are probably:
I would not use the npm override for a digest-pinned Docker image unless you are comfortable maintaining the digest separately. It solves the release-age trigger but breaks the thing that makes Docker pinning safe. If this solves it, please mark this comment as the answer so other people can find it faster. |
Beta Was this translation helpful? Give feedback.
I don't think there is a clean way to do this with one dependency entry.
overrideDatasourcechanges the datasource Renovate uses for that dependency. Onceghcr.io/pnpm/pnpmis treated asnpm:pnpm, Renovate can use npm release metadata for timing, but it has also lost the Docker datasource context needed to resolve the image digest. The digest is registry metadata, not npm package metadata.So the missing piece would be something like separate "version datasource" and "artifact/digest datasource" support. Renovate does not currently model Docker updates that way.
The practical options are probably:
docker, so digest pinning continues to work.