Docker 報錯:WRNING: IPv4 forwarding is disabled. Networking will not work.

創建容器時,報錯 WRNING: IPv4 forwarding is disabled. Networking will not work.(centos7)

解決辦法:
vim /usr/lib/sysctl.d/00-system.conf添加代碼:
net.ipv4.ip_forward=1
重啓網絡服務:
systemctl restart network
之後刪除之前的容器,重新創建即可
在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章