Docker container cannot ping with www.baidu.com and does not have ifconfig command

  docker, question

Docker builds its own bridge network.

clipboard.png

clipboard.png
After restarting the network,

clipboard.png
Then, after restarting docker, an error occurred in executing the command shown in the following figure

clipboard.png

Not every mirror contains these instructions, for example centos 7 does not have ifconfig by default.

Is this your mirror imagehttps://github.com/jdeathe/ce …?

There are centos7 and centos 6 in it. I wonder which one you are using.

Ping cannot be reached. It is related to dns settings. It can be reached throughipCommand to check your network settings

I downloaded the latest jdeathe/centos-ssh, which does not contain ifconfig and ip instructions.
If you need it, you can go through

Yum install iproute # install ip directive
 Yum install net-tools # install ifconfig command