Docker creates two bridges within the host. Why the containers in the two bridges cannot ping each other. How to set up so that they can ping each other?

each container is added to only one bridge.
the system uses the default action for ubuntu16.04, and has no special settings.

Mar.23,2022

No one answered the question and was trampled on.

answer yourself:
docker will write rules in iptables. Restrict the mutual access of containers under different bridges. Just delete this restriction.


originally, the original purpose of setting iptable in docker is to isolate containers, and you have to let them ping orz

.

if you want them to communicate, you might as well join a net namespace when you create it

Menu