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

打docker镜像时,提示: [Warning] IPv4 forwarding is disabled. Networking will not work.该问题的根源在宿主机,只需要修改宿主机内核参数net.ipv4.ip_forward=1。具体步骤如下(操作系统为ubuntu14.04):

1.vi /etc/sysctl.conf,添加如下内容:

   echo net.ipv4.ip_forward=1

2.sysctl -p(内核参数生效)

3.sysctl net.ipv4.ip_forward(若返回结果为net.ipv4.ip_forward=1,说明修改生效)

猜你喜欢

转载自blog.csdn.net/wzl1217333452/article/details/97013664