记性不好,回顾一下。按照惯例,直接看官文。

Docker’s networking subsystem is pluggable, using drivers. Several drivers exist by default, and provide core networking functionality.

bridge: The default network driver. If you don’t specify a driver, this is the type of network you are creating. Bridge networks are usually used when your applications run in standalone containers that need to communicate. User-defined bridge networks are best when you need multiple containers to communicate on the same Docker host.

host: For standalone containers, remove network isolation between the container and the Docker host, and use the host’s networking directly. host is only available for swarm services on Docker 17.06 and higher. Host networks are best when the network stack should not be isolated from the Docker host, but you want other aspects of the container to be isolated.

overlay: Overlay networks connect multiple Docker daemons together and enable swarm services to communicate with each other. Overlay networks are best when you need containers running on different Docker hosts to communicate, or when multiple applications work together using swarm services.

macvlan: Macvlan networks allow you to assign a MAC address to a container, making it appear as a physical device on your network. The Docker daemon routes traffic to containers by their MAC addresses.

none: For this container, disable all networking. none is not available for swarm services.

docker的网络子系统是插件化的,需要使用驱动。默认支持以下几种驱动:

  • bridge:桥接,默认的网络驱动,如果不指定驱动,将默认使用桥接。通常用在同一个docker主机中的多个容器间通信。
  • host:去掉容器和宿主机之间的网络隔离,直接使用宿主机的网络。通常用在网络不与宿主机隔离但是其他资源需要隔离的场景。
  • overlay:叠加网络,将多个docker daemon连接到一起。主要用在运行在不同宿主机上的容器间通信。
  • macvlan:允许为容器分配一个MAC地址,让它成为一个物理设备。
  • none:禁用网络。swarm不支持。

参考:

https://docs.docker.com/network/

docker的网络模式的更多相关文章

  1. Docker:网络模式详解

    Docker作为目前最火的轻量级容器技术,牛逼的功能,如Docker的镜像管理,不足的地方网络方面. Docker自身的4种网络工作方式,和一些自定义网络模式 安装Docker时,它会自动创建三个网络 ...

  2. Docker系列04—Docker的网络模式详解

    本文收录在容器技术学习系列文章总目录 1.Docker的四种网络模式 (1)docker四种网络模式如下: Bridge contauner   桥接式网络模式 Host(open) containe ...

  3. 详解Docker的网络模式

    我们在使用docker run创建Docker容器时,可以用--net选项指定容器的网络模式,Docker有以下4种网络模式: host模式:使用--net=host指定container模式:使用- ...

  4. docker之 网络模式和跨主机通信

    Docker的四种网络模式Bridge模式 当Docker进程启动时,会在主机上创建一个名为docker0... Docker的四种网络模式 Bridge模式 当Docker进程启动时,会在主机上创建 ...

  5. 一分钟看懂Docker的网络模式和跨主机通信

    文章转载自:http://www.a-site.cn/article/169899.html   Docker的四种网络模式Bridge模式 当Docker进程启动时,会在主机上创建一个名为docke ...

  6. Docker的网络模式和跨主机通信

    文章转载自:http://www.a-site.cn/article/169899.html   Docker的四种网络模式Bridge模式 当Docker进程启动时,会在主机上创建一个名为docke ...

  7. 2.docker的网络模式

    本篇文章使用nginx:apline  镜像进行编辑. docker 版本基于 [root@master song]# docker version Client: Version: API vers ...

  8. 1021 docker搭建mysql、网络模式、grid

    1.搭建并连接mysql服务 1.1.mysql官方命令 https://hub.docker.com/_/mysql/ #下载mysql镜像: docker pull mysql #启动mysql: ...

  9. docker 网络模式 和 端口映射

    docker 的 网络模式 docker 自带 3 种 网络模式:分别是bridge网络,host网络,none网络,可以使用  docker network ls  命令查看. 1.none网络 这 ...

随机推荐

  1. Python练习之用户登录-5

    格式化输出 %s %d %% 编码: ascii 只能显示英文,特殊字符,数字. 万国码:unicode 最开始16位,中文不够32位 4个字节. 占用资源多. 升级:utf-8 utf-16 utf ...

  2. 置换群 Burnside引理 Pólya定理(Polya)

    置换群 设\(N\)表示组合方案集合.如用两种颜色染四个格子,则\(N=\{\{0,0,0,0\},\{0,0,0,1\},\{0,0,1,0\},...,\{1,1,1,1\}\}\),\(|N|= ...

  3. 硬编码转换单位||vue

    //测试单位 formatUnit:function (id) { var val; switch(id){ case 4: return val="圈" break; } } / ...

  4. #个人博客作业week2——关于代码规范的个人观点

    对于这一讨论的前提我们首先要知道什么是代码规范. 在这个问题上我同意一篇参考文章的观点——代码规范不仅只编码风格.编码风格仅是代码规范的一个方面,除了编码风格,代码规范还包括函数返回值等其他方面.在我 ...

  5. Week 3 有求必应

    [引] 必应词典已经伴我很久了,但那并不意味着我天天都用它查来查去,它总是静静地蹲在我E盘的一角. 从前的它特别任性,总喜欢开机自己冒出头来看我.后来我嫌它每天都播报新闻,于是就把它关进了冷宫.直到不 ...

  6. 小学四则运算APP 第一个冲刺 第八天

    团队成员:陈淑筠.杨家安.陈曦 团队选题:小学四则运算APP 第一次冲刺阶段时间:11.17~11.27 本次发布的是还未完成的功能二(选择题): ChoiceActivity.java: packa ...

  7. Daily Scrum- 12/23

    Meeting Minutes 与Travis和Zhongqiu讨论了Beta的Feature以及更长期的计划: 讨论了一些使用及设计上的Bug (Feature); 开始了新的开发周期: Burnd ...

  8. NFV论文集(一)

    一 文章名称:Throughput Maximization and Resource Optimization in NFV-Enabled Networks 发表时间:2017 期刊来源:ICC: ...

  9. Maven -Maven配置tomcat插件 两种

    Maven Tomcat插件现在主要有两个版本,tomcat-maven-plugin和tomcat7-maven-plugin,使用方式基本相同. tomcat-maven-plugin 插件官网: ...

  10. Install odoo 11(10) on centos7

    https://www.odoo.com/documentation/11.0/setup/install.html https://nightly.odoo.com/ https://www.odo ...