Docker:登录私有仓库\退出私有仓库
一、登入仓库
????????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
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!