Or; not storing your password in plaintext, because duh.
This one got me by surprise; if you log in to something like Docker Hub or so using Docker, by default it stores your password in plaintext. Yikes? Fortunately there's a solution, but it still surprises me that you have to manually set this up.
I like to keep whatever packages I have installed up-to-date, so let's first update everything we have already installed:
brew update && brew upgrade && brew cleanup
Now, let's install the docker credential helper:
brew install docker-credential-helper
If you previously logged in using Docker, first run
docker logout to remove these plaintext-stored credentials. Then, open
~/.docker/config.json with your favorite text editor and add the
credsStore option so that it will kind of look like this:
// ...anything else that was already in this file
That's it! Now you can log in using
docker login and your credentials will no longer be stored in plaintext. Huzzah.