What is docker0?
I know that it’s the default bridge network. And all the containers created without network arguments fall under the default bridge network. But still can you all please deeper dive into this.
How’s the user-defined bridge network related to docker0?
If I create user-defined bridge network, does it become the child of docker0. Or is it created separately?
Also where can I deeper dive into this kind of topic?
#1 ) there is not much to add to here. It is the gateway for the default bridge network. Some people use it to publish ports that are private to the host, but still reachable from other containers by publishing 172.17.0.1:{host-port}:{container-port}.
If i create another user-defined bridge network, does it operate separately or does it become the child of docker0?
Please don’t mind if this is a silly question.
Since your question had nothing to do with eth0, I moved your question here where @meyay actually answered your question already. Since he wrote docker0 and the user-defined networks are not related, one could not be the child of the other.
If you want to test it, run a virtual machine if you don’t want to play on an existing machine, install Docker CE, and when you have docker0 among the interfaces, run this command:
ip link del docker0
Now try to create any user defined network, use it in a container and try to run any command that uses the internet. It will still work. Then you can restart Docker and the interface will be created again.