jjzjj

tags - "tag latest not found"on docker pull 与私有(private)注册表

coder 2023-05-27 原文

我无法将图像推送到私有(private)注册表并获取:

在存储库中找不到标签最新

我正在使用 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

作为测试,假设我想要一个本地版本的 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

图像似乎在那里:

# 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
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

但是当尝试从另一台服务器运行或拉取它时,我得到“未找到最新的标签”

# 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

明确添加“最新”没有帮助。同样的错误。

我可以看到调用到达注册表,所以我没有无意中使用另一个:

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
{}

问题一:怎么一开始是空的,因为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

最佳答案

我注意到 Docker 客户端失败消息并不总是反射(reflect)根本原因。当 docker 客户端未通过服务器进行身份验证时,或者 SSL 握手由于某种原因失败时,我已经看到这种情况发生。鉴于您没有使用 --insecure-registry,听起来像是后者。

关于tags - "tag latest not found"on docker pull 与私有(private)注册表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27064688/

有关tags - "tag latest not found"on docker pull 与私有(private)注册表的更多相关文章

  1. ruby - 为什么我可以在 Ruby 中使用 Object#send 访问私有(private)/ protected 方法? - 2

    类classAprivatedeffooputs:fooendpublicdefbarputs:barendprivatedefzimputs:zimendprotecteddefdibputs:dibendendA的实例a=A.new测试a.foorescueputs:faila.barrescueputs:faila.zimrescueputs:faila.dibrescueputs:faila.gazrescueputs:fail测试输出failbarfailfailfail.发送测试[:foo,:bar,:zim,:dib,:gaz].each{|m|a.send(m)resc

  2. ruby-on-rails - rails : "missing partial" when calling 'render' in RSpec test - 2

    我正在尝试测试是否存在表单。我是Rails新手。我的new.html.erb_spec.rb文件的内容是:require'spec_helper'describe"messages/new.html.erb"doit"shouldrendertheform"dorender'/messages/new.html.erb'reponse.shouldhave_form_putting_to(@message)with_submit_buttonendendView本身,new.html.erb,有代码:当我运行rspec时,它失败了:1)messages/new.html.erbshou

  3. ruby-on-rails - 由于 "wkhtmltopdf",PDFKIT 显然无法正常工作 - 2

    我在从html页面生成PDF时遇到问题。我正在使用PDFkit。在安装它的过程中,我注意到我需要wkhtmltopdf。所以我也安装了它。我做了PDFkit的文档所说的一切......现在我在尝试加载PDF时遇到了这个错误。这里是错误:commandfailed:"/usr/local/bin/wkhtmltopdf""--margin-right""0.75in""--page-size""Letter""--margin-top""0.75in""--margin-bottom""0.75in""--encoding""UTF-8""--margin-left""0.75in""-

  4. ruby - 具有身份验证的私有(private) Ruby Gem 服务器 - 2

    我想安装一个带有一些身份验证的私有(private)Rubygem服务器。我希望能够使用公共(public)Ubuntu服务器托管内部gem。我读到了http://docs.rubygems.org/read/chapter/18.但是那个没有身份验证-如我所见。然后我读到了https://github.com/cwninja/geminabox.但是当我使用基本身份验证(他们在他们的Wiki中有)时,它会提示从我的服务器获取源。所以。如何制作带有身份验证的私有(private)Rubygem服务器?这是不可能的吗?谢谢。编辑:Geminabox问题。我尝试“捆绑”以安装新的gem..

  5. ruby - 检查 "command"的输出应该包含 NilClass 的意外崩溃 - 2

    为了将Cucumber用于命令行脚本,我按照提供的说明安装了arubagem。它在我的Gemfile中,我可以验证是否安装了正确的版本并且我已经包含了require'aruba/cucumber'在'features/env.rb'中为了确保它能正常工作,我写了以下场景:@announceScenario:Testingcucumber/arubaGivenablankslateThentheoutputfrom"ls-la"shouldcontain"drw"假设事情应该失败。它确实失败了,但失败的原因是错误的:@announceScenario:Testingcucumber/ar

  6. ruby-on-rails - date_field_tag,如何设置默认日期? [ rails 上的 ruby ] - 2

    我想设置一个默认日期,例如实际日期,我该如何设置?还有如何在组合框中设置默认值顺便问一下,date_field_tag和date_field之间有什么区别? 最佳答案 试试这个:将默认日期作为第二个参数传递。youcorrectlysetthedefaultvalueofcomboboxasshowninyourquestion. 关于ruby-on-rails-date_field_tag,如何设置默认日期?[rails上的ruby],我们在StackOverflow上找到一个类似的问

  7. ruby-on-rails - 迷你测试错误 : "NameError: uninitialized constant" - 2

    我遵循MichaelHartl的“RubyonRails教程:学习Web开发”,并创建了检查用户名和电子邮件长度有效性的测试(名称最多50个字符,电子邮件最多255个字符)。test/helpers/application_helper_test.rb的内容是:require'test_helper'classApplicationHelperTest在运行bundleexecraketest时,所有测试都通过了,但我看到以下消息在最后被标记为错误:ERROR["test_full_title_helper",ApplicationHelperTest,1.820016791]test

  8. ruby-on-rails - 相关表上的范围为 "WHERE ... LIKE" - 2

    我正在尝试从Postgresql表(table1)中获取数据,该表由另一个相关表(property)的字段(table2)过滤。在纯SQL中,我会这样编写查询:SELECT*FROMtable1JOINtable2USING(table2_id)WHEREtable2.propertyLIKE'query%'这工作正常:scope:my_scope,->(query){includes(:table2).where("table2.property":query)}但我真正需要的是使用LIKE运算符进行过滤,而不是严格相等。然而,这是行不通的:scope:my_scope,->(que

  9. 使用 ACL 调用 upload_file 时出现 Ruby S3 "Access Denied"错误 - 2

    我正在尝试编写一个将文件上传到AWS并公开该文件的Ruby脚本。我做了以下事情:s3=Aws::S3::Resource.new(credentials:Aws::Credentials.new(KEY,SECRET),region:'us-west-2')obj=s3.bucket('stg-db').object('key')obj.upload_file(filename)这似乎工作正常,除了该文件不是公开可用的,而且我无法获得它的公共(public)URL。但是当我登录到S3时,我可以正常查看我的文件。为了使其公开可用,我将最后一行更改为obj.upload_file(file

  10. ruby - 安装 Ruby 时遇到问题(无法下载资源 "readline--patch") - 2

    当我尝试安装Ruby时遇到此错误。我试过查看this和this但无济于事➜~brewinstallrubyWarning:YouareusingOSX10.12.Wedonotprovidesupportforthispre-releaseversion.Youmayencounterbuildfailuresorotherbreakages.Pleasecreatepull-requestsinsteadoffilingissues.==>Installingdependenciesforruby:readline,libyaml,makedepend==>Installingrub

随机推荐