转自 两个或多个docker容器之间通过名字相互访问[https://zhuanlan.zhihu.com/p/258939355]
需要公用一个自定义网络
- 官方特意解释了这两个网卡的区别
标签:容器,network,defined,访问,other,docker,containers From: https://www.cnblogs.com/JentZhang/p/17616250.htmlUser-defined bridges provide automatic DNS resolution between containers.
Containers on the default bridge network can only access each other by IP addresses, unless you use the --link option, which is considered legacy. On a user-defined bridge network, containers can resolve each other by name or alias.