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

首頁 > 服務器 > Web服務器 > 正文

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

2024-09-01 13:50:01
字體:
來源:轉載
供稿:網友

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訪問,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對VEVB武林網網站的支持!


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 西乌珠穆沁旗| 科技| 揭东县| 阳西县| 汶上县| 仙居县| 柳林县| 凤翔县| 汾阳市| 仙游县| 南靖县| 靖宇县| 徐汇区| 海安县| 禄劝| 库伦旗| 平乡县| 习水县| 广汉市| 丹凤县| 汉川市| 绥芬河市| 临汾市| 浦县| 通城县| 保德县| 荆门市| 蒲江县| 门源| 普兰店市| 新乡市| 施甸县| 师宗县| 晋江市| 平陆县| 栾城县| 光泽县| 安阳县| 崇义县| 绵竹市| 曲麻莱县|