1. 程式人生 > >解決docker 容器內訪問宿主機“No route to host”的問題

解決docker 容器內訪問宿主機“No route to host”的問題

解決docker 容器內訪問宿主機“No route to host”的問題

 

請順序執行以下命令:

1 nmcli connection modify docker0 connection.zone trusted
2 
3 systemctl stop NetworkManager.service
4 firewall-cmd --permanent --zone=trusted --change-interface=docker0
5 systemctl start NetworkManager.service
6 nmcli connection modify docker0 connection.zone trusted
7 systemctl restart docker.service

 

原文:https://blog.csdn.net/iouczp/article/details/80300500