解决Centos下docker容器无法联网

vi /etc/sysctl.conf
找到net.ipv4.ip_forward  设置允许转发
# Controls IP packet forwarding
net.ipv4.ip_forward = 1
#使之生效
sysctl -p

#重启docker
systemctl restart docker

相关推荐