首页 > Web开发 > 详细

docker启动WARNING:IPv4 forwarding is disabled. Networking will not work.

时间:2019-11-12 21:15:52      阅读:79      评论:0      收藏:0      [点我收藏+]

docker启动容器报错IPv4 forwarding is disabled. Networking will not work.

[root@localhost ~]# docker run -p 3376:3306  -d  mysql
WARNING: IPv4 forwarding is disabled. Networking will not work.
51d6a8a733e42c7c7c2188aa37ef2126dc1d403ff3de7151f6e7e4b95bb8af2d

  

解决办法:

[root@localhost ~]# vim /etc/sysctl.conf 

net.ipv4.ip_forward=1  #添加这段代码

 

#重启network服务

[root@localhost ~]# systemctl restart network

  

#查看是否修改成功 (备注:返回1,就是成功)

[root@localhost ~]# sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1

  

docker启动WARNING:IPv4 forwarding is disabled. Networking will not work.

原文:https://www.cnblogs.com/pxblog/p/11845145.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!