docker 解决容器内访问宿主机“No route to host”的问题

时间:2021-03-06 15:06:38

修复方式请顺序运行以下命令:

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