Docker的私有仓库

网友投稿 275 2022-10-24

Docker的私有仓库

server 192.168.1.107   registry   ---push client 192.168.1.103                 --pull    【192.168.1.107上操作】 docker pull docker.io/registry docker pull nginx   启动私有仓库 docker run -d -p 5000:5000 --name registry registry 对nginx 打标记 docker tag nginx 192.168.1.107:5000/nginx20160827:v1 siysiyopush 到私有仓库中 [root@etcd ~]# docker push 192.168.1.107:5000/nginx20160827:v1 The push refers to a repository [192.168.1.107:5000/mynginx] (len: 1)unable to ping registry endpoint ping attempt failed with error: Get tls: oversized record received with length 20527v1 ping attempt failed with error: Get tls: oversized record received with length 20527 没有进行ca证书认证,跳过证书,添加: --insecure-registry 192.168.1.107:5000  [root@etcd ~]# vim /usr/lib/systemd/system/docker.service [Unit]Description=Docker Application Container EngineDocumentation=docker.socketRequires=docker.socket [Service]Type=notifyExecStart=/usr/bin/docker daemon --registry-mirror=--insecure-registry 192.168.1.107:5000 -H fd://MountFlags=slaveLimitNOFILE=1048576LimitNPROC=1048576LimitCORE=infinity [Install]WantedBy=multi-user.target 重启服务 [root@etcd ~]# systemctl daemon-reload[root@etcd ~]# systemctl restart docker.service    【192.168.1.103上操作】 没有进行ca证书认证,跳过证书,添加: --insecure-registry 192.168.1.107:5000  [root@etcd ~]# vim /usr/lib/systemd/system/docker.service [Unit]Description=Docker Application Container EngineDocumentation=docker.socketRequires=docker.socket [Service]Type=notifyExecStart=/usr/bin/docker daemon --registry-mirror=--insecure-registry 192.168.1.107:5000 -H fd://MountFlags=slaveLimitNOFILE=1048576LimitNPROC=1048576LimitCORE=infinity [Install]WantedBy=multi-user.target   # docker tag nginx 192.168.1.107:5000/nginx20160827:v1   下载镜像 查看镜像: [root@docker131 yum.repos.d]# docker images192.168.1.107:5000/nginx20160827 v1 bfdd4ced794e 3 days ago 183.4 MB 启动一个容器 [root@docker131 yum.repos.d]#  docker create  --name nginx1 -h nginx1 192.168.1.107:5000/nginx20160827:v1 [root@docker131 yum.repos.d]#  docker start nginx1 [root@docker131 yum.repos.d]# docker exec -it nginx1 /bin/bash

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:spring boot整合mongo查询converter异常排查记录
下一篇:Digi-Key与CalcuQuote合作提供报价API集成支持,为客户提供更简便途径实现30天定价保证
相关文章

 发表评论

暂时没有评论,来抢沙发吧~