Docker问题WARNING: IPv4 forwarding is disabled. Networking will not work.

[root@server1 ~]# docker run -it --name vm1 ubuntu
WARNING: IPv4 forwarding is disabled. Networking will not work.
root@edb4ef9b0bcf:/# ls
bin   dev  home  lib64  mnt  proc  run   srv  tmp  var
boot  etc  lib   media  opt  root  sbin  sys  usr

Docker问题WARNING: IPv4 forwarding is disabled. Networking will not work._第1张图片

解决方法:

[root@server1 sysctl.d]# cd /usr/lib/sysctl.d/
[root@server1 sysctl.d]# ls
00-system.conf  50-default.conf
[root@server1 sysctl.d]# vim 00-system.conf 
net.ipv4.ip_forword=1

[root@server1 sysctl.d]# systemctl restart network
[root@server1 sysctl.d]# systemctl restart docker.service

在这里插入图片描述

你可能感兴趣的:(企业)