-j DOCKER-API' \ --iptables-rule='--proto tcp --dport 2376 -j DOCKER-API' \ --iptables-rule='- -proto tcp --dport 2377 -j DOCKER-API'参数说明:-H:Docker API的监听地址和端口号--ip:指定允许访问的IP地址,可以多次使用该选项来指定多个IP地址- $ iptables -A DOCKER-API -s <ALLOWED_IP_ADDRESS> -j ACCEPT$ iptables -A DOCKER-API -s <ANOTHER_ALLOWED_IP_ADDRESS > -j ACCEPT$ iptables -A DOCKER-API -j DROP命令说明:iptables -N DOCKER-API:创建一个名为DOCKER-API的新链iptables -A DOCKER-API -s <ALLOWED_IP_ADDRESS> -j ACCEPT:添加一个允许访问的IP地址到DOCKER-API链中iptables -A DOCKER-API -j DROP
.> \ --iptables=true \ --iptables-chain=DOCKER-API \ --iptables-rule='--proto tcp --dport 2375 -j DOCKER-API' \ --iptables-rule='--proto tcp --dport 2376 -j DOCKER-API' \ --iptables-rule $ iptables -A DOCKER-API -s <ALLOWED_IP_ADDRESS> -j ACCEPT $ iptables -A DOCKER-API -s <ANOTHER_ALLOWED_IP_ADDRESS > -j ACCEPT $ iptables -A DOCKER-API -j DROP 命令说明: iptables -N DOCKER-API:创建一个名为DOCKER-API的新链 iptables -A DOCKER-API -s <ALLOWED_IP_ADDRESS> -j ACCEPT:添加一个允许访问的IP地址到DOCKER-API链中 iptables -A DOCKER-API -j
前言 1.1 项目地址 项目地址:imsyy/DailyHotApi: 今日热榜 API,一个聚合热门数据的 API 接口,支持 Vercel 部署 Docker-API:liwangsheng/dailyhot-api
查看Docker-API获取的容器列表 修改容器的IP访问地址为本机服务器IP地址,这里是192.168.3.166。也可以新增其余监控项,例如再新增一条监控宿主机httpd的web服务。
docker-version命令跟踪 5、UnixHTTPAdapter的实现 6、docker-ps命令跟踪 7、docker-logs命令跟踪 8、docker-exec 命令跟踪 9、使用curl访问docker-api DockerClient的实现 docker-version命令跟踪 UnixHTTPAdapter的实现 docker-ps命令跟踪 docker-logs命令跟踪 docker-exec 命令跟踪 使用curl访问docker-api 9、使用curl访问docker-api docker-engine的REST-api也可以直接使用 curl 访问: $ curl --unix-socket /var/run/docker.sock
process supervision) 扩展 powerstrip (A tool for prototyping Docker extensions) 客户端 docker-py (Python) docker-api