Overview

One of the reasons Docker containers and services are so powerful is that you can connect them together, or connect them to non-Docker workloads.

Docker containers and services do not even need to be aware that they are deployed on Docker, or whether their peers are also Docker workloads or not.

Whether your Docker hosts run Linux, Windows, or a mix of the two, you can use Docker to manage them in a platform-agnostic way.

This topic defines some basic Docker networking concepts and prepares you to design and deploy your applications to take full advantage of these capabilities.

Most of this content applies to all Docker installations.

However, a few advanced features are only available to Docker EE customers.

Scope of this topic

This topic does not go into OS-specific details about how Docker networks work, so you will not find information about how Docker manipulates iptables rules on Linux or how it manipulates routing rules on Windows servers, and you will not find detailed information about how Docker forms and encapsulates packets or handles encryption.

See Docker and iptables and Docker Reference Architecture: Designing Scalable, Portable Docker Container Networks for a much greater depth of technical detail.

In addition, this topic does not provide any tutorials for how to create, manage, and use Docker networks. Each section includes links to relevant tutorials and command references.

Network drivers

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. See bridge networks.

  • 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. See use the host network.

  • overlay: Overlay networks connect multiple Docker daemons together and enable swarm services to communicate with each other. You can also use overlay networks to facilitate communication between a swarm service and a standalone container, or between two standalone containers on different Docker daemons. This strategy removes the need to do OS-level routing between these containers. See overlay networks.

  • 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. Using the macvlan driver is sometimes the best choice when dealing with legacy applications that expect to be directly connected to the physical network, rather than routed through the Docker host’s network stack. See Macvlan networks.

  • none: For this container, disable all networking. Usually used in conjunction with a custom network driver. none is not available for swarm services. See disable container networking.

  • Network plugins: You can install and use third-party network plugins with Docker. These plugins are available from Docker Store or from third-party vendors. See the vendor’s documentation for installing and using a given network plugin.

Docker网络配置概述的更多相关文章

  1. docker网络配置

    Docker网络配置 Docker网络模式介绍 Docker在创建容器时有四种网络模式:bridge/host/container/none,bridge为默认不需要用--net去指定,其他三种模式需 ...

  2. Docker网络配置、Docker部署分布式项目

    目标 1.Docker网络配置 2.Docker部署SpringCloud项目 Docker网络配置 Docker网络模式介绍 Docker在创建容器时有四种网络模式:bridge/host/cont ...

  3. 5、Docker网络配置(单机)

    一.概述 以下内容参考:https://docs.docker.com/network/#network-drivers Docker容器和服务如此强大的原因之一是您可以将它们连接在一起,或者将它们连 ...

  4. docker网络配置方法总结

    docker启动时,会在宿主主机上创建一个名为docker0的虚拟网络接口,默认选择172.17.42.1/16,一个16位的子网掩码给容器提供了65534个IP地址.docker0只是一个在绑定到这 ...

  5. Docker(六):Docker网络配置进阶

    1.Docker集群网络配置之Weave Weave是Github上一个比较热门的Docker容器网络方案,具有非常良好的易用性且功能强大.仓库地址:https://github.com/weavew ...

  6. docker——网络配置

    一.网络启动与配置参数 Docker启动时会在主机上自动创建一个docker0虚拟网桥,实际上是一个Linux网桥,可以理解为一个软件交换机,它会在挂载其上的接口之间进行数据转发.同时,Docker随 ...

  7. Docker网络配置进阶

    Docker启动会默认创建docker0虚拟网桥,是Linux的一个bridge,可以理解成一个软件交换机.它会在挂载到它的网口之间进行转发. 之后所有容器都是在172.17.0.x的网段上,并且可以 ...

  8. docker 网络设置概述

    docker有3种网络: 使用命令docker network ls,执行结果如下. NETWORK ID NAME DRIVER SCOPE 82e8822065c7 bridge bridge l ...

  9. docker网络配置之自定义网桥

    使用特定范围的 IP (仅适用于v1.x)不适用于新版的v1.1x Docker 会尝试寻找没有被主机使用的 ip 段,尽管它适用于大多数情况下,但是它不是万能的,有时候我们还是需要对 ip 进一步规 ...

随机推荐

  1. Linux服务器---邮件服务postfix安装

    安装postfix postfix是一个快速.易于管理.安全性高的邮件发送服务,可以配合dovecot实现一个完美的邮箱服务器. 1.安装postfix [root@localhost ~]# rpm ...

  2. linux 3

    -- Linux -- 开心的一天 vi    所有的 unix like 系统都会内置 vi 文本编辑器 vim 较多使用的,可以主动的以字体颜色辨别语法的正确性,方便程序设计 vi/vim 的使用 ...

  3. Django 安装 创建项目 运行项目

    Django基础 框架,即framework,特指为解决一个开放性问题而设计的具有一定约束性的支撑结构,使用框架可以帮你快速开发特定的系统,简单地说,就是你用别人搭建好的舞台来做表演. 对于所有的We ...

  4. What Would you Find out about MS908CV ?

    The Autel MaxiSYS commercial car diagnostics scan device, No. MS908CV, performs increased technique ...

  5. 配置方案:Redis持久化RDB和AOF

    Redis持久化方案 Redis是内存数据库,数据都是存储在内存中,为了避免进程退出导致数据的永久丢失,需要定期将Redis中的数据以某种形式(数据或命令)从内存保存到硬盘.当下次Redis重启时,利 ...

  6. selenium webdriver 实现Canvas画布自动化测试

    https://blog.csdn.net/xiaoguanyusb/article/details/80324210 由借鉴意义, 转过来 canvas 是一个画布,定位元素时只能定位到画布上,如下 ...

  7. chrome platform

    folder_extension: ---menifest.json ---navigator_change.js manifest.json { "manifest_version&quo ...

  8. listen()函数中backlog参数分析

    实例分析1 将服务器端的listen函数backlog设置为2,用20个客户端与服务器建立连接,查看连接的建立情况. 服务器代码: #include <stdio.h> #include& ...

  9. 写给大忙人的spring cloud 1.x学习指南

    这几天抽空搞了下spring cloud 1.x(2.0目前应该来说还不成熟),因为之前项目中使用dubbo以及自研的rpc框架,所以总体下来还是比较顺利,加上spring boot,不算笔记整理,三 ...

  10. 11: python中的轻量级定时任务调度库:schedule

    1.1 schedule 基本使用 1.schedule 介绍 1. 提到定时任务调度的时候,相信很多人会想到芹菜celery,要么就写个脚本塞到crontab中. 2. 不过,一个小的定时脚本,要用 ...