Docker私有注册表 – 不允许使用方法405

我正在尝试为docker创建私有注册表,而我依赖于docker站点上的instructions given.我有一个单独的linux盒子,安装了这个注册表,然后我试图从本地推送我的图像(带有docker工具箱的osx盒子).我继续从注册表服务器获得405.我是Docker的新手.我希望默认的基本配置能够顺利运行.




    The push refers to a repository [] (len: 1)
Sending image list
Error: Status 405 trying to push repository complete: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>405 Method Not Allowed</title>\n</head><body>\n<h1>Method Not Allowed</h1>\n<p>The requested method PUT is not allowed for the URL /v1/repositories/complete/.</p>\n</body></html>\n"
doc mentions

405 Method Not Allowed

Manifest put is not allowed because the registry is configured as a pull-through cache or for some other reason

(如a read-only mode)

UNSUPPORTED: The operation was unsupported due to a missing implementation or invalid set of parameters.

同一个doc使用包含/ v2的url,而不是问题中使用的url(/ v1 / repositories / complete)

The instructions包括:

Getting the headers correct is very important. For all responses to any request under the “/v2/” url space, the Docker-Distribution-API-Version header should be set to the value “registry/2.0”, even for a 4xx response

确保您正在运行v2注册表映像(现在是docker distribution)

OP Charith实际上发现了in the comments

mistake in port forwarding on the registry host: The 5000 port was servicing from another server.
I’ve switched to an available port and everything started working.

转载注明原文:Docker私有注册表 – 不允许使用方法405 - 代码日志