docker-credential-helpers icon indicating copy to clipboard operation
docker-credential-helpers copied to clipboard

Store credentials for multiple accounts

Open neoformit opened this issue 1 year ago • 1 comments

I have multiple .docker config dirs to manage different DockerHub accounts across projects. I would like to use the secretservice manager, but it shares one login across all the docker configs.

This might be simple enough to implement if the key for the stored credential was https://index.docker.io/v1/:$USERNAME instead of just https://index.docker.io/v1/.

In which case, the ./docker/config.json entry would probably need to look more like this:

{
  "credsStore": "osxkeychain",
  "username": "blah"
}

So that docker-credentials-xxx knows which credential to pull.

neoformit avatar Jun 03 '24 02:06 neoformit

Maybe use credHelpers:

{
    "credHelpers": {
        "<aws_account_id>.dkr.ecr.<region>.amazonaws.com": "ecr-login",
        "docker-registry.my-corp.com": "osxkeychain"
    }
}

babbottscott avatar Jul 11 '24 08:07 babbottscott