Have a mirror repository for docker repositories #20370
Replies: 6 comments 2 replies
-
Converted to a discussion, Please stick to those in future instead of issues |
Beta Was this translation helpful? Give feedback.
-
You can configure Renovate to use your proxy so that you don't use the Docker Hub rate-limit when doing lookups. Also, I would look into if your container runtime (docker engine, cri-o, etc.) can be configured to use your proxy registry too. Currently I'm using {
"registryAliases": {
"index.docker.io": "<proxy address>"
},
} Ref.: https://docs.renovatebot.com/configuration-options/#registryaliases Note! It only works for some managers. The same can be done inside a |
Beta Was this translation helpful? Give feedback.
-
I got registryAliases working. But only when I set it at the global level. When I tried to set it at packageRules section it did not work. Maybe I did something wrong. But this is an issue for my use case. I only want to use registryAliases for a very limited set of docker images. Everything build in house should still go to local repository. Why I suspect that I did something wrong. I also tried this, and it didn't work either:
And I also tried the |
Beta Was this translation helpful? Give feedback.
-
For a moment I thought that it works, but it doesn't. I confirmed that the packageRule is working.
This did disable the package. But this does not replace the package name:
The internal repo name has been modified but other than that its exact code from my Renovate config. |
Beta Was this translation helpful? Give feedback.
-
I also tried these configurations:
And this does not work. When I move registryAliases to packageRules sibling:
it works, but like I said this is problematic. I could move this configuration out of global configuration to repository. But even there it is problematic. I might have docker images in .gitlab-ci.yml that we are building ourselves and that are in internal repo but the Dockerfile might have images from Dockerhub. Right now it seems that the only solution is to disable Dockerfile manager and use regex. |
Beta Was this translation helpful? Give feedback.
-
How I got it working in a way I need it to work:
And then in Dockerfile:
Bonus was that I could add versioning configuration as well with that comment. Would be nice if Dockerfile one supported those comments. |
Beta Was this translation helpful? Give feedback.
-
What would you like Renovate to be able to do?
We use internal Artifactory as docker registry. All our internal images seem to work fine, but we also proxy dockerhub through Artifactory so we can whitelist images that are allowed and have an overview that images are in use. So instead of having
FROM ubuntu
for example we useFROM internal.repo.com/ubuntu
. Unfortunately this will break Renovate as queries https://internal.repo.com/v2/ubuntu/tags/list?n=10000 or https://internal.repo.com/v2/library/ubuntu/tags/list?n=10000 return nothing as Artifactory does not proxy this information for remote repositories.If you have any ideas on how this should be implemented, please tell us here.
If we could define alternative source for image version with hostRules or with annotation in Dockerfile etc, this could solve the issue. Maybe there is a solution already, I just don't know it.
Is this a feature you are interested in implementing yourself?
No
Beta Was this translation helpful? Give feedback.
All reactions