溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

CentOS6.4如何配置docker remote api

發(fā)布時(shí)間:2021-11-15 15:39:14 來源:億速云 閱讀:150 作者:小新 欄目:云計(jì)算

小編給大家分享一下CentOS6.4如何配置docker remote api,希望大家閱讀完這篇文章之后都有所收獲,下面讓我們一起去探討吧!

我的docker版本

# 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

編輯文件:

vim /etc/sysconfig/docker

加入 other_args="-H tcp://0.0.0.0:5555 -H unix:///var/run/docker.sock"

訪問成功:

# curl http://192.168.133.128:5555/containers/json
[{"Id":"24548c4b6ea7411c3e45c2bf33691a60b8ba35de4b1f01719aa70014a9d1601b","Names":["/shipyard-rethinkdb"],"Image":"shipyard/rethinkdb","ImageID":"01d0c7f830abee950e943860d496e5369319e509c560221f22076ec76b9ba64d","Command":"/usr/bin/rethinkdb --bind all","Created":1467885825,"Ports":[{"IP":"0.0.0.0","PrivatePort":29015,"PublicPort":32768,"Type":"tcp"},{"IP":"0.0.0.0","PrivatePort":28015,"PublicPort":32769,"Type":"tcp"},{"IP":"0.0.0.0","PrivatePort":8080,"PublicPort":32770,"Type":"tcp"}],"Labels":{},"Status":"Up 14 minutes","HostConfig":{"NetworkMode":"default"}},{"Id":"714dec2d3c2fd55c0a33dc7978668738f1ae0a8540433825e3d382ba1cf3b377","Names":["/shipyard-rethinkdb-data"],"Image":"shipyard/rethinkdb","ImageID":"01d0c7f830abee950e943860d496e5369319e509c560221f22076ec76b9ba64d","Command":"/bin/bash -l","Created":1467885824,"Ports":[{"PrivatePort":29015,"Type":"tcp"},{"PrivatePort":28015,"Type":"tcp"},{"PrivatePort":8080,"Type":"tcp"}],"Labels":{},"Status":"Up 14 minutes","HostConfig":{"NetworkMode":"default"}}]

看完了這篇文章,相信你對(duì)“CentOS6.4如何配置docker remote api”有了一定的了解,如果想了解更多相關(guān)知識(shí),歡迎關(guān)注億速云行業(yè)資訊頻道,感謝各位的閱讀!

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請(qǐng)聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI