I'm using latest gitlab and the integrated docker registry. For each project I create an individual deploy token. On the host where I want to deploy the images I do docker login https://registry.example.com/project1
, enter the deploy token and get success. Pulling the image just works fine.
On the same host I need to deploy another image from the same registry. So I do docker login https://registry.example.com/project2
, the the deploy token (which is differrent to token 1, because each project has its own deploy tokens) and get success.
However looking in the .docker/config.json
I can see docker just stores the domain, not the full url, and so replaces the old auth token with the new one. So I can only pull image 2 now, but not image 1 anymore.
Is this a bug in docker? How to use more than one auth/ deploy token for the same registry?