Han*_*ans 10 tags registry pull docker
我有麻烦将图像推送到私人注册表并得到:
标记最新未在存储库中找到
我正在使用Docker提供的默认注册表容器:
# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
registry latest 7e2db37c6564 8 days ago 411.6 MB
janos/wheezy latest 900e813f1fd9 11 months ago 218.6 MB
Run Code Online (Sandbox Code Playgroud)
作为测试,假设我想要一个本地版本的wheezy:
# docker tag janos/wheezy staging-docker.mysite.nl/myself/wheezy
# docker push staging-docker.mysite.nl/myself/wheezy
The push refers to a repository [staging-docker.mysite.nl/myself/wheezy] (len: 1)
Sending image list
Pushing repository staging-docker.mysite.nl/myself/wheezy (1 tags)
7af801e4faa1: Pushing [==================================================>] 226.3 MB/226.3 MB
2014/11/21 16:06:38
Run Code Online (Sandbox Code Playgroud)
图像似乎在那里:
# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
registry latest 7e2db37c6564 8 days ago 411.6 MB
staging-docker.mysite.nl/myself/wheezy latest 900e813f1fd9 11 months ago 218.6 MB
janos/wheezy latest 900e813f1fd9 11 months ago 218.6 MB
Run Code Online (Sandbox Code Playgroud)
在本地我可以启动它:
# docker run -i -t staging-docker.mysite.nl/myself/wheezy /bin/bash
root@6b5fafe61d88:/# ls
bin boot dev etc home lib lib64 media mnt opt proc root run sbin selinux srv sys tmp usr var
root@6b5fafe61d88:/# exit
Run Code Online (Sandbox Code Playgroud)
但是当试图从另一台服务器运行或拉出它时,我得到"Tag not found not found"
# docker pull staging-docker.mysite.nl/myself/wheezy
Pulling repository staging-docker.mysite.nl/myself/wheezy
2014/11/21 16:08:15 Tag latest not found in repository staging-docker.mysite.nl/myself/wheezy
Run Code Online (Sandbox Code Playgroud)
明确添加"最新"并没有帮助.同样的错误.
我可以看到呼叫到达注册表,所以我不会无意中使用另一个:
172.17.42.1 - - [21/Nov/2014:15:08:15 +0000] "GET /v1/_ping HTTP/1.0" 200 1439 "-" "Go 1.1 package http"
172.17.42.1 - - [21/Nov/2014:15:08:15 +0000] "GET /v1/_ping HTTP/1.0" 200 1439 "-" "Go 1.1 package http"
21/Nov/2014:15:08:15 +0000 DEBUG: args = {'namespace': u'myself', 'repository': u'wheezy'}
172.17.42.1 - - [21/Nov/2014:15:08:15 +0000] "GET /v1/repositories/myself/wheezy/images HTTP/1.0" 200 164 "-" "docker/1.3.1 go/go1.3.3 git-commit/4e9bbfa kernel/3.16.0-0.bpo.2-amd64 os/linux arch/amd64"
21/Nov/2014:15:08:15 +0000 DEBUG: args = {'namespace': u'myself', 'repository': u'wheezy'}
21/Nov/2014:15:08:15 +0000 DEBUG: [get_tags] namespace=myself; repository=wheezy
172.17.42.1 - - [21/Nov/2014:15:08:15 +0000] "GET /v1/repositories/myself/wheezy/tags HTTP/1.0" 200 2 "-" "docker/1.3.1 go/go1.3.3 git-commit/4e9bbfa kernel/3.16.0-0.bpo.2-amd64 os/linux arch/amd64"
Run Code Online (Sandbox Code Playgroud)
当手动检查图像的标签时,它们确实是空的:
# curl -k https://staging-docker.mysite.nl/v1/repositories/myself/wheezy/tags
{}
Run Code Online (Sandbox Code Playgroud)
问题1:首先它是如何空的,因为Docker总是使用最新的......
问题2:如果某些事情搞砸了,最新的标签确实消失了,为什么我仍然可以在本地启动它?
Docker版本在两台服务器上都是相同的:
# docker version
Client version: 1.3.1
Client API version: 1.15
Go version (client): go1.3.3
Git commit (client): 4e9bbfa
OS/Arch (client): linux/amd64
Server version: 1.3.1
Server API version: 1.15
Go version (server): go1.3.3
Git commit (server): 4e9bbfa
Run Code Online (Sandbox Code Playgroud)
Lar*_*Cai -1
问题1:
这应该是您的远程私有注册表的问题,这可以通过您的命令确认
curl -k https://staging-docker.mysite.nl/v1/repositories/myself/wheezy/tags
Run Code Online (Sandbox Code Playgroud)
问题2
tag 只是 docker 镜像的别名,如果您以不同的命名在本地运行,它们都是从相同的 docker 镜像运行,没有区别。
并且标签latest在本地没有丢失,这是通过你的命令确认的
$ docker images
Run Code Online (Sandbox Code Playgroud)
解决方案
检查你的docker私有注册表设置并跟踪日志看看问题出在哪里,如果你想彻底解决它,你需要在远程私有注册表中附加更多调试信息。
还有远程注册表设置如何,如版本和平台。
| 归档时间: |
|
| 查看次数: |
9628 次 |
| 最近记录: |