7

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?

4

1 回答 1

10

只要您的用户名和密码保持不变,该“令牌”就会持续存在。它只是您的用户名和密码的 base-64 编码版本。“auth”值不是来自服务器——它是由dockerCLI 在registry/auth.go中生成的

于 2015-01-26T19:03:29.750 回答