创建容器的时候报错WARNING: IPv4 forwarding is disabled. Networking will not work.
# docker run -it -p 30001:22 --name=centos-ssh centos /bin/bashWARNING: IPv4 forwarding is disabled. Networking will not work. 123
# vim /usr/lib/sysctl.d/00-system.conf
添加如下代码:
net.ipv4.ip_forward=1
重启network服务
# systemctl restart network
完成以后,删除错误的容器,再次创建新容器,就不再报错了。
本文出自 “爱生活的小白” 博客,请务必保留此出处http://sf1314.blog.51cto.com/13295031/1976034
Docker报错 WARNING: IPv4 forwarding is disabled. Networking will not work.
原文地址:http://sf1314.blog.51cto.com/13295031/1976034