国产探花免费观看_亚洲丰满少妇自慰呻吟_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武林網網站的支持!


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 射阳县| 平遥县| 苗栗县| 会泽县| 枣庄市| 平遥县| 禄丰县| 蒙山县| 新安县| 嘉义县| 陇南市| 德化县| 马龙县| 依兰县| 潍坊市| 新乡市| 武平县| 揭西县| 峡江县| 赤峰市| 兴安盟| 乌兰浩特市| 田东县| 仙游县| 老河口市| 铜山县| 榕江县| 海林市| 布拖县| 环江| 怀集县| 凤山市| 体育| 鹤峰县| 信阳市| 德庆县| 云和县| 霍州市| 北流市| 蓬安县| 淳安县|