“执行curl时,404页面未find”–unix-socket /var/run/docker.sock http:/ containers / json`
docker version: 1.11.2 curl version: 7.50.3 (x86_64-pc-linux-gnu) libcurl/7.50.3 OpenSSL/1.0.1e zlib/1.2.7
/usr/local/sbin/bin/curl --unix-socket /var/run/docker.sock http://images/json -v * Trying /var/run/docker.sock... * Connected to images (/var/run/docker.sock) port 80 (#0) > GET /json HTTP/1.1 > Host: images > User-Agent: curl/7.50.3 > Accept: */* > < HTTP/1.1 404 Not Found < Content-Type: text/plain; charset=utf-8 < X-Content-Type-Options: nosniff < Date: Thu, 22 Sep 2016 06:11:52 GMT < Content-Length: 19 < 404 page not found * Curl_http_done: called premature == 0 * Connection #0 to host images left intact
我的docker守护进程有什么问题吗? 我如何从docker unix-socket获取容器信息? docker达曼是绝对开始。
我跟着这个页面: https : curl --unix-socket /var/run/docker.sock http:/containers/json
,其build议我们使用curl 7.40或更高版本,命令curl --unix-socket /var/run/docker.sock http:/containers/json
。 你可以发现这个命令中有一个unavild的URL http:/containers/json
。
然后我下载最新的curl 7.50.3,这个问题的关键是curl的版本,我们应该像下面这样执行:
curl --unix-socket /var/run/docker.sock http://localhost/images/json
更多细节请看这个页面。 https://superuser.com/questions/834307/can-curl-send-requests-to-sockets 。 希望能帮助其他一些困惑的人。
- 集群模式下的容器之间的Docker通信encryption
- 问题与docker撰写
- 从`docker diff`创build文件/文件夹大小的树形图
- Kong APIauthentication使用Oauth2.0
- testing容器结束时终止docker组成
- Android Espresso:java.lang.IncompatibleClassChangeError:类“java.lang.Class”没有实现接口“java.util.Collection”
- 在“docker run”命令中,“sandbox”是什么意思?
- 使用squid代理连接时ERR_PROXY_CONNECTION_FAILED
- Docker-构成MemoryError