docker 容器内访问宿主机 "No route to host"
# docker 容器内访问宿主机 "No route to host"
原因我也没有深入了解,但是解决了我的问题
# 解决方法
按顺序执行
nmcli connection modify docker0 connection.zone trusted
systemctl stop NetworkManager.service
firewall-cmd --permanent --zone=trusted --change-interface=docker0
systemctl start NetworkManager.service
nmcli connection modify docker0 connection.zone trusted
systemctl restart docker.service
1
2
3
4
5
6
2
3
4
5
6
# 参考链接
上次更新: 2020/06/11, 18:06:00