When docker login
succeeds an auth token is put in ~/.dockercfg
. We are considering deploying a .dockercfg
file to EC2 instances to all running of containers against private repository images. The alternative would be to run docker login
on the instances, but I would prefer to give instances an auth token as opposed to an account password.
How long do the tokens issued by docker.io
last before they expire?
That "token" will last as long as your username and password remain unchanged. It is just a base-64 encoded version of your username and password. The "auth" value doesn't come from the servers -- it is generated by the docker
CLI in registry/auth.go
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