我有麻煩拉動圖像推到一個私人註冊並獲得:「標籤最新找不到」泊塢窗上拉了私人註冊表
標籤最遲不會在庫中找到
我使用由碼頭工人提供默認的註冊表容器:
# 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
作爲測試,假設我希望有喘息的本地版本:
# 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
的圖像似乎有:
# 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
和地方我可以啓動它:
# docker run -i -t staging-docker.mysite.nl/myself/wheezy /bin/bash
[email protected]:/# ls
bin boot dev etc home lib lib64 media mnt opt proc root run sbin selinux srv sys tmp usr var
[email protected]:/# exit
但是,試圖運行或從另一臺服務器把它的時候,我得到「標籤最遲不會發現「
# 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
明確添加」latest「並沒有幫助。同樣的錯誤。
我可以看到呼叫到達註冊表,所以我不inadvertedly使用另:
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"
,並手動檢查圖像的標籤時,他們確實是空的:
# curl -k https://staging-docker.mysite.nl/v1/repositories/myself/wheezy/tags
{}
問題1:怎麼會是擺在首位空,因爲碼頭工人總是使用最新的...
問題2:如果不知何故事情搞砸了,最新的標籤確實沒有了,我怎麼還能在本地啓動呢?
泊塢版本是相同的兩臺服務器上:
# 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
最新的標籤仍然存在,問題出在遠程註冊表。你可以嘗試運行一個本地的? ('碼頭運行-p5000:5000註冊表')並嘗試從它推/拉? ('docker tag myself/wheezy 127.0.0.1:5000/myself/wheezy && docker push 127.0.0.1:5000/myself/wheezy')看看它是否有效。 – creack 2014-11-21 15:53:03
你是對的。這確實奏效了(必須使用--insecure-repository),但我仍然朦朧,第一次出了什麼問題。我能想象的唯一的事情就是,我沒有改變基礎圖像中的任何東西(janos/wheezy),然後再次將其標記爲我/喘息。 這次我提交圖像然後給它加上標籤,然後改變它(在根中TEST_REPO的簡單觸摸),並且它工作正常。 猜猜我仍然朦朧的標籤邏輯。謝謝! – Hans 2014-11-24 13:09:52
這是舊的,幾乎肯定不再是問題,但是我在將公共庫轉換爲私有庫後出現此問題。在命令行再次登錄解決了它對我來說。 – MyCompassSpins 2016-04-18 04:03:10