国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > 建站經驗 > 正文

Centos Docker1.12 遠程Rest api訪問的配置方法

2019-11-02 16:49:29
字體:
來源:轉載
供稿:網友

Docker默認是沒有開啟HTTP遠程訪問的,默認只支持通過unix socket通信操作docker daemon,需要使用HTTP restful接口需要修改配置。

1、修改配置文件,文件位置/lib/systemd/system/docker.service。將原來的ExecStart修改為:

[Unit]Description=Docker Application Container EngineDocumentation=https://docs.docker.comAfter=network.target[Service]Type=notify# the default is not to use systemd for cgroups because the delegate issues still# exists and systemd currently does not support the cgroup feature set required# for containers run by docker#ExecStart=/usr/bin/dockerd#ExecStart=/usr/bin/dockerd -H 192.168.25.130:2375ExecStart=/usr/bin/docker daemon --tls=false -H unix:///var/run/docker.sock -H tcp://192.168.25.130:2375ExecReload=/bin/kill -s HUP $MAINPID# Having non-zero Limit*s causes performance problems due to accounting overhead# in the kernel. We recommend using cgroups to do container-local accounting.LimitNOFILE=infinityLimitNPROC=infinityLimitCORE=infinity# Uncomment TasksMax if your systemd version supports it.# Only systemd 226 and above support this version.#TasksMax=infinityTimeoutStartSec=0# set delegate yes so that systemd does not reset the cgroups of docker containersDelegate=yes# kill only the docker process, not all processes in the cgroupKillMode=process[Install]WantedBy=multi-user.target

2.執行

systemctl daemon-reloadsystemctl restart docker.service

注:如果docker命令是無法使用的請在、etc/profile中配置:

export DOCKER_HOST= 'http://192.168.25.128:2375'

是之生效

source /etc/profile

3、官方API說明文檔

官方鏈接:Docker Remote API v1.24

以上所述是小編給大家介紹的Centos Docker1.12 遠程Rest api訪問,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對腳本之家網站的支持!

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 吴忠市| 漳平市| 蒙阴县| 林西县| 宜阳县| 集安市| 和田县| 喀什市| 开江县| 克山县| 湘潭市| 嘉义县| 万年县| 会理县| 廉江市| 修武县| 淮北市| 庄河市| 肥城市| 哈尔滨市| 土默特左旗| 渭南市| 邵东县| 正安县| 乌鲁木齐县| 景泰县| 安宁市| 罗平县| 噶尔县| 栖霞市| 连城县| 奈曼旗| 昌都县| 南投县| 九龙县| 时尚| 万安县| 工布江达县| 鄄城县| 鲜城| 定远县|