国产探花免费观看_亚洲丰满少妇自慰呻吟_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訪問,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對腳本之家網站的支持!

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 巴里| 衡水市| 宝坻区| 靖州| 泗水县| 深州市| 平昌县| 罗甸县| 邢台县| 淮北市| 江西省| 玛曲县| 林西县| 抚宁县| 华坪县| 资兴市| 柘荣县| 喜德县| 黄浦区| 沅陵县| 历史| 天峻县| 阜阳市| 三穗县| 晋中市| 三明市| 措勤县| 香河县| 汾西县| 田东县| 措美县| 蒙自县| 英德市| 喜德县| 马山县| 广西| 兰坪| 乌兰察布市| 合川市| 牙克石市| 武隆县|