【发布时间】:2019-03-31 05:38:46
【问题描述】:
启动 Sonatype Nexus 3 映像(命令 1)后,我尝试创建一个存储库并将一个测试映像(命令 2)推送到该存储库,但收到错误 405(错误 1)
命令 1
$ docker run -d -p 8081:8081 --name nexus sonatype/nexus3:3.14.0
命令 2
$ docker push 127.0.0.1:8081/repository/test2/image-test:0.1
错误 1
error parsing HTTP 405 response body: invalid character '<' looking for beginning of value: "\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <title>405 - Nexus Repository Manager</title>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>\n\n\n <!--[if lt IE 9]>\n <script>(new Image).src=\"http://127.0.0.1:8081/favicon.ico?3.14.0-04\"</script>\n <![endif]-->\n <link rel=\"icon\" type=\"image/png\" href=\"http://127.0.0.1:8081/favicon-32x32.png?3.14.0-04\" sizes=\"32x32\">\n <link rel=\"mask-icon\" href=\"http://127.0.0.1:8081/safari-pinned-tab.svg?3.14.0-04\" color=\"#5bbad5\">\n <link rel=\"icon\" type=\"image/png\" href=\"http://127.0.0.1:8081/favicon-16x16.png?3.14.0-04\" sizes=\"16x16\">\n <link rel=\"shortcut icon\" href=\"http://127.0.0.1:8081/favicon.ico?3.14.0-04\">\n <meta name=\"msapplication-TileImage\" content=\"http://127.0.0.1:8081/mstile-144x144.png?3.14.0-04\">\n <meta name=\"msapplication-TileColor\" content=\"#00a300\">\n\n <link rel=\"stylesheet\" type=\"text/css\" href=\"http://127.0.0.1:8081/static/css/nexus-content.css?3.14.0-04\"/>\n</head>\n<body>\n<div class=\"nexus-header\">\n <a href=\"http://127.0.0.1:8081\">\n <div class=\"product-logo\">\n <img src=\"http://127.0.0.1:8081/static/images/nexus.png?3.14.0-04\" alt=\"Product logo\"/>\n </div>\n <div class=\"product-id\">\n <div class=\"product-id__line-1\">\n <span class=\"product-name\">Nexus Repository Manager</span>\n </div>\n <div class=\"product-id__line-2\">\n <span class=\"product-spec\">OSS 3.14.0-04</span>\n </div>\n </div>\n </a>\n</div>\n\n<div class=\"nexus-body\">\n <div class=\"content-header\">\n <img src=\"http://127.0.0.1:8081/static/rapture/resources/icons/x32/exclamation.png?3.14.0-04\" alt=\"Exclamation point\" aria-role=\"presentation\"/>\n <span class=\"title\">Error 405</span>\n <span class=\"description\">Method Not Allowed</span>\n </div>\n <div class=\"content-body\">\n <div class=\"content-section\">\n HTTP method POST is not supported by this URL\n </div>\n </div>\n</div>\n</body>\n</html>\n\n"
【问题讨论】:
标签: docker nexus sonatype nexus3