Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why docker login command saves unencrypted password on my computer?

I've used docker login command and passed my credentials and I got warning WARNING: login credentials saved in /Users/{my_username}/.docker/config.json. I've checked that file and indeed my password is there unencrypted (base64 encoded only).

Why docker saved my password unencrypted? Shouldn't it save it in my key-chain (I am on Mac OS) or instead of saving password just generate some access token or something like that?

like image 908
user606521 Avatar asked Aug 12 '15 09:08

user606521


People also ask

Where is docker password stored?

By default, Docker stores the login password unencrypted within the /root/. docker/config.


2 Answers

This is now solved, and as you suggest, you can save to the keychain (or use other "helpers"). Full details are in the Docker docs: https://docs.docker.com/engine/reference/commandline/login/#credentials-store

For anyone interested in the history and why this wasn't a trivial fix: https://github.com/docker/docker/issues/10318

like image 53
Adrian Mouat Avatar answered Sep 18 '22 15:09

Adrian Mouat


You can use Credential Store for this purpose. Here is the offical doc from Docker:

Credential Store

like image 38
Ferhat Avatar answered Sep 20 '22 15:09

Ferhat