[Docker]容器启动报错WARNING: IPv4 forwarding is disabled. Networking will not work.

问题

[root@DB1 zabbix]# docker run -d -p 8080:8080 -p 8443:8443 --name=drawio jgraph/drawio
WARNING: IPv4 forwarding is disabled. Networking will not work.
c7934bbf0e04de0b8b28231396a3f1421c6f84844fc43ad0693ddfb5a8a58170

查看系统是否转发

[root@DB1 zabbix]# sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 0

开启系统转发

echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf
sysctl -p
[root@DB1 zabbix]# sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1

END

posted @ 2020-12-11 09:39  LeoShi2020  阅读(128)  评论(0编辑  收藏  举报