1、问题描述:启动docker容器时,报以下警告:
WARNING: IPv4 forwarding is disabled. Networking will not work.
2、解决方法
(1)在宿主机上面执行:
echo "net.ipv4.ip_forward=1" >> /usr/lib/sysctl.d/00-system.conf
(2)重启network和docker服务
systemctl restart network && systemctl restart docker
原文地址:https://www.cnblogs.com/yufeng218/p/9452524.html
时间: 2024-10-06 02:28:49