docker4种网络
基于docker run创建容器时,可以使用--net选项指定容器的网络模式:Docker默认有以下4种网络模式:
- host模式,使用--net=host指定
- container模式,使用--net=container:NAME_or_ID指定
- none模式,使用--net=none指定
- bridge模式,使用--net=bridge指定,默认设置
bridge模式网络拓扑图如下:
host模式网络拓扑如下:
container模式网络拓扑图如下:
docker4种网络
基于docker run创建容器时,可以使用--net选项指定容器的网络模式:Docker默认有以下4种网络模式:
bridge模式网络拓扑图如下:
host模式网络拓扑如下:
container模式网络拓扑图如下:
来源:https://www.cnblogs.com/fengzi7314/p/11921162.html