2021-05-12 14:32:11
CentOS 7 中docker info報錯docker bridge-nf-call-iptables is disabled 的解決方法
2020-06-16 16:33:33
在CentOS 7中安裝好docker以後,啟動成功,執行命令 docker info ,報錯:
[root@www.linuxidc.com ~]# 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,就看不到報錯了。
相關文章