Features like teams and groups for DockerHub have been slow to get added and even slower for DockerCloud. This means multiple hub accounts - one for you as a developer and one for managing the repos of your workplace.
And you may often end up wondering:
How to use `docker login` to register multiple usernames so if one doesn't work for the repo you're trying to upload, it uses another one?The answer is that its currently not possible!
If you look inside the config file (`cat ~/.docker/config.json`)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"auths": { | |
"https://index.docker.io/v1/": {"auth": "xxx"} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"auths": { | |
"https://index.docker.io/v1/": [ | |
"myWork/repos": {"auth": "xxx"}, | |
"me/repos": { "auth": "xxx" } | |
] | |
} | |
} |
There are references to alternative credential stores in the docs but it is not clear if such docker-credential-helpers understand multiple logins for the same site or not. Perhaps is would be best to setup teams and groups properly with permissions rather than focusing energy into managing multiple logins.