初次接触docker,在启动docker的时候提示警告 WARNING: IPv4 forwarding is disabled. Networking will not work.
[root@localhost mytomcat]# docker run --name eduweb -dp 8801:8080 edu
WARNING: IPv4 forwarding is disabled. Networking will not work.
经过网上一番冲浪,解决方案如下:
修改配置文件:
vim /usr/lib/sysctl.d/00-system.conf
追加
net.ipv4.ip_forward=1
接着重启网络
[root@localhost mytomcat]# systemctl restart network
然后将之前错误的docker删掉,重新创建启动即可
------------------------------------------------------------
不追加结果,docker安装MySQL,redis。。。。。等软件无法进行链接
----------------------------------------------