docker私有镜像仓库如何使用
先修改配置文件,增加
"insecure-registries": ["10.2.4.247","harbor"]
完整配置文件如下

hosts文件增加
10.2.4.247 harbor
登陆私有镜像仓库
[root@localhost ~]# docker login 10.2.4.247
Username: admin
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
给镜像打个标签
[root@localhost ~]# docker tag tomcat:latest 10.2.4.247/test/tomcat:v1
上传镜像到私有仓库
[root@localhost ~]# docker push 10.2.4.247/test/tomcat:v1
查看镜像仓库有没有刚刚上传的tomcat镜像

从私有镜像仓库下载镜像
[root@localhost ~]# docker pull 10.2.4.247/test/tomcat:v1
v1: Pulling from test/tomcat
Digest: sha256:1505b2512d9f02383b9e4f89f35966035e8c3aba1c00fff391f48d07fc9fd507
Status: Downloaded newer image for 10.2.4.247/test/tomcat:v1
10.2.4.247/test/tomcat:v1
至此harbor的简单使用完成!
下面来一张美图哦

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。