5

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?

1 Answer 1

6
  1. Remove the last line from the "%UserProfile%/.docker/config.json" file:

(Don't forget to remove the trailing ',')

{ "auths": { "https://index.docker.io/v1/": {} }, "HttpHeaders": { "User-Agent": "Docker-Client/17.12.0-ce (windows)" } } 
  1. Save the config.json file.
  2. Run 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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.