????????docker login :?登陆到一个Docker镜像仓库,如果未指定镜像仓库地址,默认为官方仓库 Docker Hub
语法: docker login [OPTIONS] [SERVER]
docker login -u 用户名 -p 密码 仓库名称? ? ? # 登入私有仓库[root@localhost?~]# docker login --username=用户名 registry.cn-hangzhou.aliyuncs.com
Password:?
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-storeLogin Succeeded
????????docker logout :?登出一个Docker镜像仓库,如果未指定镜像仓库地址,默认为官方仓库 Docker Hub
语法: docker logout [SERVER]? ? ? ? ?# 退出默认官方仓库
[root@localhost?~]# docker logout?
Removing login credentials for https://index.docker.io/v1/
# 退出私有仓库[root@localhost~]# docker logout registry.cn-hangzhou.aliyuncs.com
Removing login credentials for registry.cn-hangzhou.aliyuncs.com