从远程registry – 泊坞窗拉图像

我已经安装了docker 1.11.2,我正在为我们的办公室build立一个私人registry。

我跟着这个链接做私人registry,我已经成功地从本地主机拉,但我坚持试图从远程机器拉。

我所做的简短描述

步骤1 :

docker run -d -p 5000:5000 --restart=always --name registry registry:2 

第2步:

 [root@raj raj]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE hello-world latest c54a2cc56cbb 11 days ago 1.848 kB registry 2 8ff6a4aae657 4 weeks ago 171.5 MB 

第三步:(对于本地主机)

 [root@raj raj]# docker tag hello-world localhost:5000/hello-world [root@raj raj]# docker push localhost:5000/hello-world The push refers to a repository [localhost:5000/hello-world] a02596fdd012: Pushed latest: digest: sha256:a18ed77532f6d6781500db650194e0f9396ba5f05f8b50d4046b294ae5f83aa4 size: 524 

步骤4:

 [root@raj raj]# docker pull localhost:5000/hello-world Using default tag: latest latest: Pulling from hello-world Digest: sha256:a18ed77532f6d6781500db650194e0f9396ba5f05f8b50d4046b294ae5f83aa4 Status: Image is up to date for localhost:5000/hello-world:latest 

它工作正常

我想从远程机器的私人registry中拉图像,所以我已经改变了下面的第3步

第3步:

 [root@raj raj]# docker tag hello-world 192.168.1.23:5000/hello-world [root@raj raj]# docker push 192.168.1.23:5000/hello-world The push refers to a repository [192.168.1.23:5000/hello-world] Get https://192.168.1.23:5000/v1/_ping: tls: oversized record received with length 20527 

但它会抛出错误:超大

我有一些链接相关的问题link1 , link2,但它不能解决我的问题

我对这个链接有一些怀疑

1)我找不到在该位置/ etc / sysconfig / docker,/ etc / default / docker中的任何docker文件以更改-insecure-registry

2)docker -d –insecure-registry 10.11.12.0:5000(这个命令不起作用,抛出错误。

 [root@raj raj]# docker -d --insecure-registry 192.168.1.23:5000 flag provided but not defined: -d See 'docker –help'. 

请帮助获取从远程机器到私人registry的请求。

按照docker命令的顺序进行私有注册

服务器端

 docker daemon --insecure-registry server-ip:5000 docker run -d -p 5000:5000 --restart=always --name registry registry:2 docker tag hello-world server-ip:5000/hello-world docker push server-ip:5000/hello-world 

客户端

 docker daemon --insecure-registry server-ip:5000 docker pull server-ip:5000/hello-world 

现在,您可以从您的远程存储库中拉出/推送,有关registry的更多详细信息,可以使用此命令docker inspect registry ,它将显示图像获取存储的位置以及更多信息。

更新docker config添加“–insecure-registry”,通常文件位于/ etc / default / docker ,如果你使用docker-machine这个文件位于/ var / lib / boot2docker / profile