当前位置: 代码迷 >> 综合 >> Error(22) 解决WARNING: IPv4 forwarding is disabled. Networking will not work.
  详细解决方案

Error(22) 解决WARNING: IPv4 forwarding is disabled. Networking will not work.

热度:37   发布时间:2023-12-13 13:16:54.0

文章目录

      • 问题
      • 解决

问题

docker运行容器的时候如下警告??:

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

解决

# 修改配置
echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf# 重启network
systemctl restart network# 查看
sysctl net.ipv4.ip_forward
# net.ipv4.ip_forward = 1# 重启docker
systemctl restart docker

之后再重启容器即可 ^_^


今日分享语句:
每个人都有潜在的能量,只是很容易被习惯所粉饰,被时光所迷离,被惰性所消磨。

  相关解决方案