centos 7 docker 启动了一个web服务 但是启动时 报

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

#需要做如下配置

解决办法:

vi /etc/sysctl.conf

net.ipv4.ip_forward=1  #添加这段代码

#重启network服务

systemctl restart network && systemctl restart docker

#查看是否修改成功 (备注:返回1,就是成功)

[root@docker-node2 ~]# sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1

相关文章:

  • 2021-10-30
  • 2021-07-20
  • 2021-07-23
  • 2021-10-28
  • 2021-11-28
猜你喜欢
  • 2022-12-23
  • 2021-06-18
  • 2021-11-24
  • 2021-07-22
  • 2021-10-11
  • 2021-12-23
相关资源
相似解决方案