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

CentOS7.1

. 运行某镜像时,报WARNING: IPv4 forwarding is disabled. Networking will not work.

docker run -it 94e814e2efa8 bash

. 解决方法

echo net.ipv4.ip_forward=1 >> /usr/lib/sysctl.d/00-system.conf
systemctl restart network && systemctl restart network

再执行1的命令就不报错了.
posted @ 2019-05-21 23:41  三百里江山  阅读(819)  评论(0编辑  收藏  举报