好的,通过启动守护进程,我已经启用了通过HTTP管理docker守护进程,如下所示:
/usr/bin/docker -d -H fd:// -H=0.0.0.0:2376
我可以创建容器并通过远程API删除它们(即其他调用运行良好),但是如果我试图提取图像,则会出现如下错误:
curl -v -X POST http://localhost:2376/images/create?from=ubuntu
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 2376 (#0)
> POST /images/create?from=ubuntu HTTP/1.1
> User-Agent: curl/7.38.0
> Host: localhost:2376
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json
< Date: Thu, 01 Oct 2015 09:01:02 GMT
< Transfer-Encoding: chunked
<
{"status":"Downloading from http://"}
{"errorDetail":{"message":"Get http://: http: no Host in request URL"},"error":"Get http://: http: no Host in request URL"}
* Connection #0 to host localhost left intact
有人知道答案是什么吗?
发布于 2015-10-01 09:09:27
啊,好像是参数名中的错误。
"from" -> "fromImage"
基本上,如果缺少查询参数,就会得到这个错误。
还要确保设置了tag=latest,否则它会下载所有的ubuntu图像!
https://stackoverflow.com/questions/32883586
复制相似问题