我在我的一台服务器上设置了一个私有的docker注册表(让我们称之为server-1)。我可以成功地在此服务器中推送和拉取图像。 server-1:Docker版本1.7.1
kuankr-staging@kuankrstaging-OptiPlex-390:~$ docker push docker.agutong.com:5000/registry
The push refers to a repository [docker.agutong.com:5000/registry] (len: 1)
2f1ef7702586: Image already exists
97cf055388e0: Image successfully pushed
8703b7c675b1: Image successfully pushed
4f780ec6d926: Image successfully pushed
db95df628950: Image successfully pushed
a5f051f1f664: Image successfully pushed
2d449bb18c75: Image successfully pushed
8251da35e7a7: Image successfully pushed
e5855facec0b: Image successfully pushed
5bff21ba5409: Image successfully pushed
6071b4945dcf: Image successfully pushed
Digest: sha256:45671274c462f148a968d4c867ff70cfd34f0a913b3a4bcdd0870dab396f32d1
事情进展顺利。 然后我想将另一个服务器映像推送到此注册表。我们称之为server-2。 server-2:Docker 1.3.1版。 server-1和server-2位于同一本地网络中。
$ docker images
docker.agutong.com:5000/agutong_base latest 75606af212f5 12 months ago
我跑
docker push docker.agutong.com:5000/agutong_base
打印:
The push refers to a repository [docker.agutong.com:5000/agutong_base] (len: 1)
Sending image list
2015/08/14 18:44:57
这些输出看起来与成功的push
不同。我相信它会崩溃。
如果我在服务器1中成功拉出前面的docker.agutong.com:5000/registry
,它也不起作用。
$ docker pull docker.agutong.com:5000/registry:latest
Pulling repository docker.agutong.com:5000/registry
2015/08/14 18:51:59 Error: image registry not found
总之,pull
和push
在服务器1中运行良好,但在服务器2中运行良好。
答案 0 :(得分:0)
当我推入或拉入server-2时,docker-registry记录404记录:
192.168.1.152 - - [14/Aug/2015:12:34:41 +0000] "GET /v1/_ping HTTP/1.1" 404 19 "" "curl/7.35.0"
192.168.1.152 - - [14/Aug/2015:12:34:59 +0000] "GET /v1/ping HTTP/1.1" 404 19 "" "curl/7.35.0"
192.168.1.152 - - [14/Aug/2015:12:35:02 +0000] "GET /v1/search HTTP/1.1" 404 19 "" "curl/7.35.0"
192.168.1.152 - - [14/Aug/2015:12:36:10 +0000] "GET /v1/_ping HTTP/1.1" 404 19 "" "Go 1.1 package http"
192.168.1.152 - - [14/Aug/2015:12:36:10 +0000] "PUT /v1/repositories/agutong_base/ HTTP/1.1" 404 19 "" "docker/1.3.1 go/go1.3.3 git-commit/4e9bbfa kernel/3.13.0-24-generic os/linux arch/amd64"
192.168.1.152 - - [14/Aug/2015:12:40:41 +0000] "GET /v1/_ping HTTP/1.1" 404 19 "" "Go 1.1 package http"
192.168.1.152 - - [14/Aug/2015:12:40:41 +0000] "GET /v1/repositories/registry/images HTTP/1.1" 404 19 "" "docker/1.3.1 go/go1.3.3 git-commit/4e9bbfa kernel/3.13.0-24-generic os/linux arch/amd64"
也许我需要在server-2中升级docker