How to know if docker is already logged in to a docker registry server

后端 未结 13 2475
后悔当初
后悔当初 2020-12-23 02:49

I\'m not sure if I have already logged in to a docker registry in cmd line by using cmd: docker login. How can you test or see whether you are logged in or not, without tryi

相关标签:
13条回答
  • 2020-12-23 03:25

    On windows you can inspect the login "authorizations" (auths) by looking at this file: [USER_HOME_DIR].docker\config.json

    Example: c:\USERS\YOUR_USERANME.docker\config.json

    It will look something like this for windows credentials

    {
    "auths": {
        "HOST_NAME_HERE": {},
        "https://index.docker.io/v1/": {}
    },
    "HttpHeaders": {
        "User-Agent": "Docker-Client/18.09.0 (windows)"
    },
    "credsStore": "wincred",
    "stackOrchestrator": "swarm"
    }
    
    0 讨论(0)
提交回复
热议问题