Docker远程API-拉/创建映像不工作

Docker远程API-拉/创建映像不工作,docker,Docker,好的,我已经启用了通过HTTP管理docker守护程序,方法是启动守护程序,如下所示: /usr/bin/docker -d -H fd:// -H=0.0.0.0:2376 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.

好的,我已经启用了通过HTTP管理docker守护程序,方法是启动守护程序,如下所示:

/usr/bin/docker -d -H fd:// -H=0.0.0.0:2376

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
我可以通过远程API创建容器并删除它们(即其他调用工作正常),但如果我尝试拉取图像,则会出现如下错误:

/usr/bin/docker -d -H fd:// -H=0.0.0.0:2376

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

curl-v-X柱http://localhost:2376/images/create?from=ubuntu
*在DNS缓存中找不到主机名
*正在尝试127.0.0.1。。。
*已连接到本地主机(127.0.0.1)端口2376(#0)
>POST/images/create?from=ubuntuhttp/1.1
>用户代理:curl/7.38.0
>主机:本地主机:2376
>接受:*/*
> 

有人知道答案是什么吗?

啊,看起来是参数名中的一个输入错误

"from" -> "fromImage"
如果缺少查询参数,基本上会出现此错误

还要确保设置tag=latest,否则它会下载所有ubuntu图片