Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When do DockerHub auth tokens expire?

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?

like image 685
mgk Avatar asked Jan 26 '15 18:01

mgk


Video Answer


1 Answers

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

like image 51
Andy Avatar answered Oct 07 '22 14:10

Andy