### /etc/docker/daemon.json - 在原有基础上增加hosts部分 ```json { "hosts": ["unix:///var/run/docker.sock", "tcp://0.0.0.0:2375"] } ``` ### docker启动脚本,systemctl service方式 - 停止docker,systemctl stop docker - 修改/usr/lib/systemd/system/docker.service,保留 dockerd就可以 ![image-20240914172847794](https://blog-heysq-1255479807.cos.ap-beijing.myqcloud.com/typora/image-20240914172847794.png) - systemctl daemon-reload - systemctl start docker - netstat -nlp | grep 2375 - lsof -i:2375 ### 远程连接 ```bash docker -H192.168.0.3 ps ```