Document

Docker容器中的ipv4问题

Docker容器中的ipv4问题

如果在docker容器中有如下提示:

[Warning] IPv4 forwarding is disabled. Networking will not work.

这是因为默认的ipv4转发没有开启,解决方案如下:

1.编辑配置文件

vi /usr/lib/sysctl.d/00-system.conf

2.加入下面一行:

net.ipv4.ip_forward=1

3.重启network服务

systemctl restart network
posted @ 2021-01-22 14:56  从未被超越  阅读(1038)  评论(0)    收藏  举报