@joe.garcia shared this with me recently and it’s too good not to share here too!
Docker has released the beta of their two-factor authentication for DockerHub. Everyone should enable this if you haven’t already. If you use the Docker CLI to push images to DockerHub, you will need to create a Personal Access Token in order to
docker loginto DockerHub from now on.
For Mac Users:
I stored my Personal Access Token in my OSX Keychain Access and use Summon with the keyring.py provider. Now when I go to login to DockerHub via Docker CLI, I can just do
summon --yaml 'TOKEN: !var docker/token' bash -c 'docker login -u nfmsjoeg -p $TOKEN'.