我正在尝试使用REST来构建DockerFile存储库。
我使码头管理员能够收听TCP 2375。
我证实了它是有效的:
curl http://localhost:2375/images/json
我收到了我所有照片的清单。
我正在尝试来自Docker 网站 (或第二个网站)的网站命令。
我需要使用build命令和remote参数。
他们写道:
Git存储库URI或HTTP/HTTPS上下文URI。如果URI指向单个文本文件,则将文件的内容放入一个名为Dockerfile的文件中,并从该文件构建图像。如果URI指向tarball,则该文件由守护进程下载,其中的内容用作构建的上下文。如果URI指向tarball,并且还指定了dockerfile参数,则必须在tarball中有一个具有相应路径的文件。
但我不知道如何传递GitHub URL。
我创建了一个简单的存储库,其中包含一个DockerFile:
FROM alpine
GitHub存储库的地址是:
https://github.com/stackoverflowquestion/myrepo/blob/master/DockerFile
这就是我试过的:
curl http://localhost:2375/build?remote=https://github.com/stackoverflowquestion/myrepo/blob/master/DockerFile
curl http://localhost:2375/build?remote=https://github.com/stackoverflowquestion/myrepo
curl http://localhost:2375/build?remote=https://github.com/stackoverflowquestion
curl http://localhost:2375/build?remote=https://raw.githubusercontent.com/stackoverflowquestion/myrepo/master/DockerFile他们都不管用。
我一直收到:
{"message":"page not found"}发布于 2018-04-10 16:52:08
使用链接的原始版本,并指定方法POST:
curl -X POST http://localhost:2375/build?remote=https://raw.githubusercontent.com/stackoverflowquestion/myrepo/master/DockerFilehttps://stackoverflow.com/questions/49758398
复制相似问题