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-store

Login 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

相关推荐

  1. Docker登录私有仓库\退出私有仓库

    2023-12-30 01:46:05       31 阅读

最近更新

  1. TCP协议是安全的吗?

    2023-12-30 01:46:05       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-30 01:46:05       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-30 01:46:05       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-30 01:46:05       18 阅读

热门阅读

  1. 【Qt-QString】

    2023-12-30 01:46:05       38 阅读
  2. Seatunnel Docker image镜像制作

    2023-12-30 01:46:05       30 阅读
  3. MyBatis之缓存

    2023-12-30 01:46:05       26 阅读
  4. Nginx和OpenResty面试题及简单示例

    2023-12-30 01:46:05       28 阅读
  5. c语言结构体内存对齐

    2023-12-30 01:46:05       34 阅读
  6. 互联网摸鱼日报(2023-12-26)

    2023-12-30 01:46:05       38 阅读
  7. @staticmethod函数装饰器

    2023-12-30 01:46:05       35 阅读
  8. 有序数组的平方

    2023-12-30 01:46:05       37 阅读
  9. 深入探讨在SpringBoot中分布式锁的实现与应用

    2023-12-30 01:46:05       31 阅读
  10. RecyclerView刷新显示的问题

    2023-12-30 01:46:05       39 阅读