zoukankan      html  css  js  c++  java
  • docker启动WARNING:IPv4 forwarding is disabled. Networking will not work.

    docker启动容器报错IPv4 forwarding is disabled. Networking will not work.

    [root@localhost ~]# docker run -p 3376:3306  -d  mysql
    WARNING: IPv4 forwarding is disabled. Networking will not work.
    51d6a8a733e42c7c7c2188aa37ef2126dc1d403ff3de7151f6e7e4b95bb8af2d
    

      

    解决办法:

    [root@localhost ~]# vim /etc/sysctl.conf 

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

    #重启network服务

    [root@localhost ~]# systemctl restart network
    

      

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

    [root@localhost ~]# sysctl net.ipv4.ip_forward
    net.ipv4.ip_forward = 1
    

      

  • 相关阅读:
    Vue-dialog(弹框组件)
    Vue封装select下拉组件
    RAID总结
    消息队列
    存储
    算法开始
    硬件杂记
    要看的
    关于kernel的疑问,不解
    杂技
  • 原文地址:https://www.cnblogs.com/pxblog/p/11845145.html
Copyright © 2011-2022 走看看