我正在尝试为docker创建私有注册表,而我依赖于docker站点上的
instructions given.我有一个单独的linux盒子,安装了这个注册表,然后我试图从本地推送我的图像(带有docker工具箱的osx盒子).我继续从注册表服务器获得405.我是Docker的新手.我希望默认的基本配置能够顺利运行.
组态
最新的docker工具箱.
最新的注册表安装
我只更改TLS配置以通过http发布请求.
错误
The push refers to a repository [192.168.1.98:5000/complete] (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
UNSUPPORTED: The operation was unsupported due to a missing implementation or invalid set of parameters.
同一个doc使用包含/ v2的url,而不是问题中使用的url(/ v1 / repositories / complete)
Getting the headers correct is very important. For all responses to any request under the “
/v2/
” url space, theDocker-Distribution-API-Version
header should be set to the value “registry/2.0
”, even for a4xx
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.