在centos7中安裝好docker以後,啟動成功,運行命令 docker info ,報錯: [root@iz2ze2bn5x2wqxdeq65wlpz ~]# docker info Client: Debug Mode: false Server: Containers: 4 Ru... ...
在centos7中安裝好docker以後,啟動成功,運行命令 docker info ,報錯:
[root@iz2ze2bn5x2wqxdeq65wlpz ~]# docker info Client: Debug Mode: false Server: Containers: 4 Running: 0 Paused: 0 Stopped: 4 Images: 2 Server Version: 19.03.1 ....................... WARNING: bridge-nf-call-iptables is disabled WARNING: bridge-nf-call-ip6tables is disabled
解決辦法:
vim /etc/sysctl.conf
在文件尾部添加以下三行內容:
net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1 net.bridge.bridge-nf-call-arptables = 1
然後,再執行命令:
sysctl -p
或者:
sysctl -p 2>/dev/null| grep bridge
現在,我們再執行命令:docker info,就看不到報錯了。