docker开启远程访问
编辑/usr/lib/systemd/system/docker.service
文件
在ExecStart=/usr/bin/dockerd
后面增加 -H tcp://0.0.0.0:2375
然后运行命令:
systemctl daemon-reload systemctl restart docker
连接docker超时报错
解决办法 关闭防火墙
systemctl stop firewalld.service
编辑/usr/lib/systemd/system/docker.service
文件
在ExecStart=/usr/bin/dockerd
后面增加 -H tcp://0.0.0.0:2375
然后运行命令:
systemctl daemon-reload systemctl restart docker
systemctl stop firewalld.service