1.首先確保防火墻關閉,或者開啟2375端口的訪問權限
- 臨時開啟2375命令
[root@master mysql]# dockerd -H tcp://0.0.0.0:2375
3.永久開啟2375方式
[root@master mysql]# vim /usr/lib/systemd/system/docker.service
在尾部追加
-H tcp://0.0.0.0:2375
重啟docker
[root@master mysql]# systemctl daemon-reload
[root@master mysql]# systemctl restart docker
Warning: docker.service changed on disk. Run 'systemctl daemon-reload' to reload units.