4-Docker命令之docker logout

2023-12-20 09:27:08

1.docker logout介绍

docker logout命令是用来退出使用docker login命令登录到的镜像仓库,如果未指定镜像仓库地

址,默认为docker hub官方仓库

2.docker logout用法

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]# 

3.实例

3.1.退出docker私有仓库

命令:

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]# 

文章来源:https://blog.csdn.net/z19861216/article/details/134787431
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。