好的,我已启用通过启动守护程序来管理docker守护程序,如下所示:
/usr/bin/docker -d -H fd:// -H=0.0.0.0:2376
我可以通过Remote 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
任何人都知道答案是什么?
答案 0 :(得分:0)
啊看起来好像是参数名称中的拼写错误
"from" -> "fromImage"
如果缺少查询参数,基本上会出现此错误。
另外请确保设置tag = latest,否则会下载所有ubuntu图像!