Docker 私有注册表 - 方法不允许 405

Docker private registry - Method not allowed 405

我正在尝试为 docker 创建私有注册表,并且我依赖于 docker 站点上的 instructions given。我有一个安装此注册表的单独 linux 框,然后我尝试从本地(osx 框和 docker 工具箱推送我的图像。我不断从注册表服务器获取 405。我对 docker 很陌生。我希望默认的基本配置能够正常工作。

配置

最新docker 工具箱。 最新的注册表安装。 我只将 TLS 配置更改为 post 通过 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

(喜欢a read-only mode

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

同一文档使用包含 /v2 的 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 actually found :

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.