Docker container can’t connect to the net, how to deal with it

  docker, question

Docker container can’t connect to the net, how to deal with it

Operation in host computersysctl net.ipv4.conf.all.forwardingMake sure this forwarding function is on.
If it doesn’t open, it will run.sysctl net.ipv4.conf.all.forwarding=1Open it.