docker的网络模式
记性不好,回顾一下。按照惯例,直接看官文。
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的网络模式的更多相关文章
- Docker:网络模式详解
Docker作为目前最火的轻量级容器技术,牛逼的功能,如Docker的镜像管理,不足的地方网络方面. Docker自身的4种网络工作方式,和一些自定义网络模式 安装Docker时,它会自动创建三个网络 ...
- Docker系列04—Docker的网络模式详解
本文收录在容器技术学习系列文章总目录 1.Docker的四种网络模式 (1)docker四种网络模式如下: Bridge contauner 桥接式网络模式 Host(open) containe ...
- 详解Docker的网络模式
我们在使用docker run创建Docker容器时,可以用--net选项指定容器的网络模式,Docker有以下4种网络模式: host模式:使用--net=host指定container模式:使用- ...
- docker之 网络模式和跨主机通信
Docker的四种网络模式Bridge模式 当Docker进程启动时,会在主机上创建一个名为docker0... Docker的四种网络模式 Bridge模式 当Docker进程启动时,会在主机上创建 ...
- 一分钟看懂Docker的网络模式和跨主机通信
文章转载自:http://www.a-site.cn/article/169899.html Docker的四种网络模式Bridge模式 当Docker进程启动时,会在主机上创建一个名为docke ...
- Docker的网络模式和跨主机通信
文章转载自:http://www.a-site.cn/article/169899.html Docker的四种网络模式Bridge模式 当Docker进程启动时,会在主机上创建一个名为docke ...
- 2.docker的网络模式
本篇文章使用nginx:apline 镜像进行编辑. docker 版本基于 [root@master song]# docker version Client: Version: API vers ...
- 1021 docker搭建mysql、网络模式、grid
1.搭建并连接mysql服务 1.1.mysql官方命令 https://hub.docker.com/_/mysql/ #下载mysql镜像: docker pull mysql #启动mysql: ...
- docker 网络模式 和 端口映射
docker 的 网络模式 docker 自带 3 种 网络模式:分别是bridge网络,host网络,none网络,可以使用 docker network ls 命令查看. 1.none网络 这 ...
随机推荐
- Jlink使用技巧之虚拟串口功能
前言 串口调试是单片机开发过程必不可少的一个功能,一般是使用一个UART-TTL的串口模块来实现串口的功能,其实下载调试使用的Jlink仿真器也可以实现串口调试的功能,本篇文章将介绍如何使用Jlink ...
- 微信小程序中的组件
前言 之前做小程序开发的时候,对于开发来说比较头疼的莫过于自定义组件了,当时官方对这方面的文档也只是寥寥几句,一笔带过而已,所以写起来真的是非常非常痛苦!! 好在微信小程序的库从 1.6.3 开始,官 ...
- B. Diagonal Walking v.2
链接 [https://i.cnblogs.com/EditPosts.aspx?opt=1] 题意 二维平面从原点出发k步,要到达的点(x,y),每个位置可以往8个方位移动,问到达目的地最多可以走多 ...
- SCRUM 12.20
以下为我们爬虫遇到问题的报告 我们团队的m2阶段原本计划是爬取美团的信息以支持我们的app对比功能,但在这一阶段遇到很多问题,主要表现如下: 美团反爬机制: 由于我们团队人员在事先并不知道美团具有反爬 ...
- Scrum Meeting 9
第九次会议 No_00:工作情况 No_01:任务说明 待完成 已完成 No_10:燃尽图 No_11:照片记录 待更新 No_100:代码/文档签入记录 No_101:出席表 ...
- 安装虚拟环境和Flask
一.Flask 使用前准备 一. 安装及创建虚拟环境 1. 安装虚拟环境 win + R -> cmd -> pip install virtualenv -> 出现 Success ...
- shell脚本--变量与数组
Linux中的变量有环境变量和用户自定义变量,关于环境变量,可以查看这篇博客:linux环境变量 本文主要针对的是用户在shell脚本中定义的变量,但是环境变量也可以在shell脚本中使用. 普通变量 ...
- Linux列举所有隐藏文件
ll 命令是 ls -l的缩写 ls -a是列举所有(all)文件,包含隐藏文件,以.开头的文件. ls -l是以列表(list)方式列举文件. http://bbs.chinaunix.net/th ...
- A glance for agile method
看看Apache最新的JIRA,新版的JIRA是有Agile模块的. Scrum早有耳闻,接触得也比较多,Kanban一次面试中提到过.今日深入查阅KanBan: http://www.agilewe ...
- ODBC 驱动程序管理器 在指定的 DSN 中,驱动程序和应用程序之间的体系结构不匹配 解决方案
程序报错如下: ---------------------------Microsoft 数据链接错误---------------------------测试连接失败,因为初始化提供程序时发生错误. ...