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网络 这 ...
随机推荐
- 面试2——java基础3
21.Http请求的get和post的区别? get:从 指定的资源请求数据.请注意,查询字符串(名称/值对)是在 GET 请求的 URL 中发送的 post:向指定的资源提交要被处理的数据.请注意, ...
- (4)学习笔记 ) ASP.NET CORE微服务 Micro-Service ---- Consul服务发现和消费
上一章说了 Consul服务注册 现在我要连接上Consul里面的服务 请求它们的API接口 应该怎么做呢? 1.找Consul要一台你需要的服务器 1.1 获取Consul下的所有注册的服务 u ...
- Linux服务器更换主板后,网卡识别失败的处理方法
1)现象说明公司IDC机房里的一台线上服务器硬件报警,最后排查发现服务器主板坏了,随即联系厂商进行更换主板,最后更换后,登录服务器,发现网卡绑定及ip信息都在,但是ip却ping不通了,进一步排查,重 ...
- Mysql主从同步(1) - 概念和原理介绍 以及 主从/主主模式 部署记录
Mysql复制概念Mysql内建的复制功能是构建大型高性能应用程序的基础, 将Mysql数据分布到多个系统上,这种分布机制是通过将Mysql某一台主机数据复制到其它主机(slaves)上,并重新执行一 ...
- MySQL的启动程序
1.mysqld: mysql server [root@test bin]# ./mysqld --user=mysql & [root@test bin]# ps ...
- Linux实验四报告
张文俊 + 原创作品转载请注明出处+ <Linux内核分析>MOOC课程http://mooc.study.163.com/course/USTC-1000029000 一.学习内容 系统 ...
- Linux内核分析(第九周)
第一周总结1.存储程序计算机 + 函数调用堆栈 + 中断机制 2.堆栈:C语言程序运行时候必须的一个记录调用路径和参数的空间(函数调用框架/提供局部变量/传递参数/保存返回地址) 不同指令可能实现相同 ...
- Linux内核分析(第七周)
可执行程序的装载 一.预处理.编译.链接和目标文件的格式 1.可执行程序怎么来的? 预处理: gcc -E -o hello.cpp hello.c -m32 *负责把include的文件包含进来及宏 ...
- github链接
github链接:https://github.com/bjing123 test1:https://github.com/bjing123/test-/blob/master/test1.t ...
- 结构化分析(SA)
1.什么叫模型?我觉得它的关键字:抽象 重要特征 降低复杂度. 2.软件设计的方法 分类:面向功能~,面向对象的设计. 面向数据流的方法是在结构化分析中提到的. 哦~ 3.面向数据流的结构化分析 特点 ...