/usr/lib/systemd/system/docker.service
在后面添加监听地址与端口
1 2
systemctl daemon-reload systemctl restart docker
1
curl -XGET http://localhost:2375/version
docker -H tcp://192.168.31.26:2375 info
export DOCKER_HOST="tcp://192.168.31.26:2375"