【发布时间】:2016-06-16 13:11:15
【问题描述】:
我正在尝试让 Docker 构建和发布插件在我们的 Jenkins 实例上运行。 Docker 映像正在正确构建,但我在将此映像推送到我们的 Artifactory Docker 存储库时遇到问题。
Artifactory 存储库托管在 https://instance.company.com/artifactory/test-docker-build
当我查看构建日志时,它无法上传 Docker 映像,但 url 看起来像 https://instance.company.com/test-docker-build。这是日志的输出:
[workspace] $ docker push instance.company.com/test-docker-build:test
The push refers to a repository [instance.company.com/test-docker-build] (len: 1)
Sending image list
Error: Status 405 trying to push repository test-docker-build: "<!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/test-docker-build/.</p>\n</body></html>\n"
Build step 'Docker Build and Publish' marked build as failure
Finished: FAILURE
我假设它失败是因为存储库 URL 不正确。我还尝试登录后端并使用正确的存储库 URL 通过命令行推送,但这似乎也不起作用。
我的主要问题是:docker 不喜欢 URL 结构,因为它使用“/”来表示用户/图像名称吗? IE。如果 url 不包含 /artifactory,这会起作用吗?
任何想法将不胜感激!
【问题讨论】:
标签: jenkins docker artifactory