Unable to push image to a docker registry configured as proxy cache

扶醉桌前 提交于 2020-12-04 17:17:31

问题


I followed this guide to setup a Docker v2 Registry acting as a local proxy cache for Docker Hub images. My Docker daemon is configured with both --insecure-registry and --registry-mirror options pointing to the same registry instance.

When pulling images it works correctly by caching them to the local store.

The problem is that when I try to push an image to such local private registry, I get a weird UNSUPPORTED error. The registry log says:

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

If I disable proxy setting on the registry then the push works correctly. Am I missing something on the configuration or it is just that a private registry cannot act as a proxy cache at the same time?


回答1:


Just ran into this myself. Turns out pushing to a private registry configured as a proxy is not supported. See

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

"Pushing to a registry configured as a pull through cache is currently unsupported".

That is too bad. Now I will have to will have to setup the local proxy cache as a separate registry.



来源:https://stackoverflow.com/questions/33610215/unable-to-push-image-to-a-docker-registry-configured-as-proxy-cache

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!