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.