神剑山庄资源网 Design By www.hcban.com
Ubuntu16.04Docker的CS模式
Remote API
docker除了使用命令让用户通过客户端与docker的守护进行通信,也提供了Remote API方式的通信接口
RESTful风格API
STDIN,STDOUT,STDERR
连接方式
使用socket方式进行连接,有下列三种方式
unix:///var/run/docker.sock
tcp://host:port
fd://socketfd
eggyer@ubuntu:/usr/local/dockerfile/df_test1$ docker version Client: Version: 1.9.1 API version: 1.21 Go version: go1.4.3 Git commit: a34a1d5 Built: Fri Nov 20 17:56:04 UTC 2015 OS/Arch: linux/amd64 Server: Version: 1.9.1 API version: 1.21 Go version: go1.4.3 Git commit: a34a1d5 Built: Fri Nov 20 17:56:04 UTC 2015 OS/Arch: linux/amd64
如上所示可以看到server中APIversion(remote API的版本)
通过unix:///var/run/docker.sock访问
注意发送HTTP请求时输入完get信息后要连按两次回车
eggyer@ubuntu:/usr/local/dockerfile/df_test1$ nc -U /var/run/docker.sock GET /info HTTP/1.1 HTTP/1.1 200 OK Content-Type: application/json Server: Docker/1.9.1 (linux) Date: Sat, 26 Nov 2016 14:33:45 GMT Content-Length: 1162 {"ID":"WBMI:TD6B:PRUN:XWSX:5RVV:QUYO:5S27:W74L:MQ3W:YDB7:JXPL:NR5X","Containers":12,"Images":11,"Driver":"aufs","DriverStatus":[["Root Dir","/var/lib/docker/aufs"],["Backing Filesystem","extfs"],["Dirs","35"],["Dirperm1 Supported","true"]],"MemoryLimit":true,"SwapLimit":false,"CpuCfsPeriod":true,"CpuCfsQuota":true,"IPv4Forwarding":true,"BridgeNfIptables":true,"BridgeNfIp6tables":true,"Debug":false,"NFd":19,"OomKillDisable":true,"NGoroutines":33,"SystemTime":"2016-11-26T22:33:45.641108177+08:00","ExecutionDriver":"native-0.2","LoggingDriver":"json-file","NEventsListener":0,"KernelVersion":"4.4.0-47-generic","OperatingSystem":"Ubuntu 16.04.1 LTS (containerized)","IndexServerAddress":"https://index.docker.io/v1/","RegistryConfig":{"InsecureRegistryCIDRs":["127.0.0.0/8"],"IndexConfigs":{"docker.io":{"Name":"docker.io","Mirrors":null,"Secure":true,"Official":true}},"Mirrors":null},"InitSha1":"","InitPath":"/usr/bin/docker","NCPU":4,"MemTotal":4125528064,"DockerRootDir":"/var/lib/docker","HttpProxy":"","HttpsProxy":"","NoProxy":"","Name":"ubuntu","Labels":null,"ExperimentalBuild":false,"ServerVersion":"1.9.1","ClusterStore":"","ClusterAdvertise":""}
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!
神剑山庄资源网 Design By www.hcban.com
神剑山庄资源网
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
神剑山庄资源网 Design By www.hcban.com
暂无Ubuntu16.04Docker的CS模式详细介绍的评论...
更新日志
2024年11月15日
2024年11月15日
- 黄乙玲1988-无稳定的爱心肝乱糟糟[日本东芝1M版][WAV+CUE]
- 群星《我们的歌第六季 第3期》[320K/MP3][70.68MB]
- 群星《我们的歌第六季 第3期》[FLAC/分轨][369.48MB]
- 群星《燃!沙排少女 影视原声带》[320K/MP3][175.61MB]
- 乱斗海盗瞎6胜卡组推荐一览 深暗领域乱斗海盗瞎卡组分享
- 炉石传说乱斗6胜卡组分享一览 深暗领域乱斗6胜卡组代码推荐
- 炉石传说乱斗本周卡组合集 乱斗模式卡组最新推荐
- 佟妍.2015-七窍玲珑心【万马旦】【WAV+CUE】
- 叶振棠陈晓慧.1986-龙的心·俘虏你(2006复黑限量版)【永恒】【WAV+CUE】
- 陈慧琳.1998-爱我不爱(国)【福茂】【WAV+CUE】
- 咪咕快游豪礼放送,百元京东卡、海量欢乐豆就在咪咕咪粉节!
- 双11百吋大屏焕新“热”,海信AI画质电视成最大赢家
- 海信电视E8N Ultra:真正的百吋,不止是大!
- 曾庆瑜1990-曾庆瑜历年精选[派森][WAV+CUE]
- 叶玉卿1999-深情之选[飞图][WAV+CUE]