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

 

查看

(base) [root@VM-12-17-centos test]# vim /etc/sysctl.conf

添加代码:net.ipv4.ip_forward=1

也有人说下面这个文件:反正我试试了没啥用

(base) [root@VM-12-17-centos test]# vim /usr/lib/sysctl.d/00-system.conf

第二步:重启network服务:

 systemctl restart network

 

posted @ 2021-12-21 22:04  wqbin  阅读(67)  评论(0编辑  收藏  举报