containrrr / watchtower

A process for automating Docker container base image updates.
https://containrrr.dev/watchtower/
Apache License 2.0
19.81k stars 873 forks source link

Multiple Token on same Registry #2060

Open ermanno00 opened 16 hours ago

ermanno00 commented 16 hours ago

Is your feature request related to a problem? Please describe.

I have two projects on my gitlab that are in different groups so I generated two deploy tokens on which each one has the permission to read his own registry.

My config.json file is:

{ "auths": { "registry.gitlab.com/project1": { "auth": "" }, "registry.gitlab.com/project2": { "auth": "" } } }

I have this file under ~/.docker/ and it is working. In fact, when i try to pull a docker compose the image that is on the first repo uses the "token1" while the image that is on the second repo uses the "token2".

If i share or duplicate the same file in watchtower one of the two images won't be pulled because seems that watchtower uses only the first part of the registry (before the first "/").

How can I use multiple token for the same registry?

Describe the solution you'd like

Can you use a different approach to check the registries?

Describe alternatives you've considered

I haven't used alternatives

Additional context

No response

github-actions[bot] commented 16 hours ago

Hi there! 👋🏼 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 🙏