Amazon Elastic Beanstalk requires a plaintext key from Docker in order to access private images on Docker Hub. According to the instructions on AEB, you simply need to run docker login
to generate these credentials in "%UserProfile%/.docker/config.json". However, this generates the following file:
{
"auths": {
"https://index.docker.io/v1/": {}
},
"HttpHeaders": {
"User-Agent": "Docker-Client/17.12.0-ce (windows)"
},
"credsStore": "wincred"
}
The credentials were stored in "wincred", the windows credential manager.
How do I instead force the credentials to be generated, temporarily, within the config.json file instead?
(Don't forget to remove the trailing ',')
{
"auths": {
"https://index.docker.io/v1/": {}
},
"HttpHeaders": {
"User-Agent": "Docker-Client/17.12.0-ce (windows)"
}
}
docker login
.If you look inside the config.json file, you will now find what you need. From what I understand, these credentials should be valid until either your username or password changes (you can see why it's good to have these in the credential manager!).
After you've copied out the auth key, you'll want to restore the config.json file to its original state:
{
"auths": {
"https://index.docker.io/v1/": {}
},
"HttpHeaders": {
"User-Agent": "Docker-Client/17.12.0-ce (windows)"
},
"credsStore": "wincred"
}
Then run docker login
once more to put things back how they originally were.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With