Centos Docker1.12 远程Rest api访问
来源:互联网 发布:es5sham.min.js 编辑:程序博客网 时间:2024/06/05 02:00
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-reload
systemctl 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
0 0
- Centos Docker1.12 远程Rest api访问
- CentOS 7 配置Docker 远程API访问
- Docker1.10.1以上版本配置http API访问
- 远程访问API设计
- PhoneGap+jQuery Mobile+Rest 访问远程数据
- PhoneGap+jQuery Mobile+Rest 访问远程数据
- 如何远程访问centos 6.5
- centos mysql开启远程访问
- Window 远程访问CentOS 图形界面
- Centos 设置Mysql远程访问
- Docker 开启远程访问API
- java api 远程访问hdfs
- docker1.12--安装
- centos7 安装 docker1.12
- ArcGIS API for Silverlight中通过https访问rest服务
- 用twitcurl C++库访问Twitter REST API 1.1
- Wordpress 禁用未登录的用户访问 REST API
- 在centos 下开启MySQL远程访问
- 自然语言学习,WordNet词典,java编程方法
- 重写 重载 多态
- 基于.NET平台常用的框架整理
- 微信小程序AES加密解密相关
- 从Java到android:类的加载机制
- Centos Docker1.12 远程Rest api访问
- Java异常的深入研究与分析
- web页面性能优化方案汇总
- 贝叶斯决策
- 匿名函数 闭包
- spring三大核心学习
- linux学习笔记--sar命令
- jpa和hibernate的主键生成策略
- 17.类型转换