程序员潇然 发表于 2023-3-23 14:19:52

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

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

### 现象:

docker 运行直接报错,报错信息:IPv4 forwarding is disabled. Networking will not work.

### 解决:

1.解决方式:

第一步:在宿主机上执行

```echo "net.ipv4.ip_forward=1" >>/usr/lib/sysctl.d/00-system.conf```

2.第二步:重启network和docker服务

```# systemctl restart network && systemctl restart docker```

### 验证:

重启docker后,应用验证是否解决
页: [1]
查看完整版本: WARNING: IPv4 forwarding is disabled. Networking will not work.