docker logout命令是用来退出使用docker login命令登录到的镜像仓库,如果未指定镜像仓库地
址,默认为docker hub官方仓库
docker logout [SERVER]
[root@centos79 harbor]# docker logout --help
Usage: docker logout [SERVER]
Log out from a registry.
If no server is specified, the default is defined by the daemon.
[root@centos79 harbor]#
命令:
docker logout http://172.20.10.12:5100
[root@centos79 harbor]# docker login -u admin -p Harbor12345 http://172.20.10.12:5100
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
[root@centos79 harbor]# docker logout http://172.20.10.12:5100
Removing login credentials for 172.20.10.12:5100
[root@centos79 harbor]#