无法将映像推送到配置为代理缓存的 docker 注册表

2024-03-22

我跟着this http://blog.docker.com/2015/10/registry-proxy-cache-docker-open-source/设置 Docker v2 注册表作为 Docker Hub 映像的本地代理缓存的指南。我的 Docker 守护进程配置了两者--insecure-registry and --registry-mirror指向同一注册表实例的选项。

拉取图像时,它可以通过将图像缓存到本地存储来正常工作。

问题是,当我尝试将图像推送到此类本地私有注册表时,我得到了一个奇怪的结果UNSUPPORTED错误。注册表日志显示:

time="2015-11-09T13:20:22Z" level=error msg="response completed with error" err.code=UNSUPPORTED err.message="The operation is unsupported." go.version=go1.4.3 http.request.host="my.registry.io:5000" http.request.id=b1faccb3-f592-4790-bbba-00ebb3a3bfc1 http.request.method=POST http.request.remoteaddr="192.168.0.4:57608" http.request.uri="/v2/mygroup/myimage/blobs/uploads/" http.request.useragent="docker/1.9.0 go/go1.4.2 git-commit/76d6bc9 kernel/3.16.0-4-amd64 os/linux arch/amd64" http.response.contenttype="application/json; charset=utf-8" http.response.duration=2.035918ms http.response.status=405 http.response.written=78 instance.id=79970ec3-c38e-4ebf-9e83-c3890668b122 vars.name="mygroup/myimage" version=v2.2.0

如果我禁用注册表上的代理设置,则推送可以正常工作。我是否在配置上遗漏了某些内容,或者只是私有注册表无法同时充当代理缓存?


我自己刚刚遇到了这个。事实证明,不支持推送到配置为代理的私有注册表。看

https://docs.docker.com/registry/configuration/#proxy https://docs.docker.com/registry/configuration/#proxy

“当前不支持推送到配置为拉取缓存的注册表”。

那太糟糕了。现在我必须将本地代理缓存设置为单独的注册表。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

无法将映像推送到配置为代理缓存的 docker 注册表 的相关文章

随机推荐