1.產(chǎn)生原因:
Docker報錯 WARNING: IPv4 forwarding is disabled. Networking will not work.
1.# docker run -it -p 30001:22 --name=centos-ssh centos /bin/bash
2.WARNING: IPv4 forwarding is disabled. Networking will not work.
修改這個錯誤
1.# vim /usr/lib/sysctl.d/00-system.conf
2.添加這個文檔
net.ipv4.ip_forward=1
3.重啟
# systemctl restart network
完成以后建蹄,刪除錯誤的容器,再次創(chuàng)建新容器,就不再報錯了,數(shù)據(jù)庫連接windows系統(tǒng)的Nacivat也不會報錯了