Estimated reading time: 1 minute

If you use the host network mode for a container, that container’s network stack is not isolated from the Docker host (the container shares the host’s networking namespace), and the container does not get its own IP-address allocated. For instance, if you run a container which binds to port 80 and you use host networking, the container’s application is available on port 80 on the host’s IP address.

Note: Given that the container does not have its own IP-address when using host mode networking, port-mapping does not take effect, and the -p, --publish, -P, and --publish-all option are ignored, producing a warning instead:WARNING: Published ports are discarded when using host network mode

Host mode networking can be useful to optimize performance, and in situations where a container needs to handle a large range of ports, as it does not require network address translation (NAT), and no “userland-proxy” is created for each port.

The host networking driver only works on Linux hosts, and is not supported on Docker Desktop for Mac, Docker Desktop for Windows, or Docker EE for Windows Server.

You can also use a host network for a swarm service, by passing --network host to the docker service create command. In this case, control traffic (traffic related to managing the swarm and the service) is still sent across an overlay network, but the individual swarm service containers send data using the Docker daemon’s host network and ports. This creates some extra limitations. For instance, if a service container binds to port 80, only one service container can run on a given swarm node.
Next steps

Go through the host networking tutorial
Learn about networking from the container’s point of view
Learn about bridge networks
Learn about overlay networks
Learn about Macvlan networks

network, host, standalone

Use host networking相关推荐

  1. VirtualBox Nonexistent host networking interface 错误解决方案

    以前在Crack一个需要局域网通信的程序的时候在VirtualBox里架设了2个XP虚拟机, 时隔数月, 又一次要用到这2个虚拟机, 从休眠中唤醒时竟然给出以下提示: 不能为虚拟电脑 XP 打开一个新 ...

  2. VBoxManage: error: Nonexistent host networking interface, name 'vboxnet0' (VERR_INTERNAL_ERROR)

    错误: VBoxManage: error: Nonexistent host networking interface, name 'vboxnet0' (VERR_INTERNAL_ERROR) ...

  3. KVM Virtual Networking Concepts

    KVM Virtual Networking Concepts - NovaOrdis Knowledge Basehttps://kb.novaordis.com/index.php/KVM_Vir ...

  4. AWS — AWS 上的 5G 网络

    目录 文章目录 目录 AWS 上的 E2E 5G 网络 AWS 上的 5G Core Network Service Based Architecture CP 的高可用部署 UP 的多网络平面 St ...

  5. 干货 | 云计算时代携程的网络架构变迁

    作者简介 赵亚楠,携程云平台资深架构师.2016 年加入携程云计算部门,先后从事 OpenStack.SDN.容器网络(Mesos.K8S).容器镜像存储.分布式存储等产品的开发,目前带领 Ctrip ...

  6. 容器私有云和持续发布都要解决哪些基础问题 第一集

    郑昀编著,文字资料来自于张帆.白俊华.刘飞宇以及网络资料 创建于2015/10/21 最后更新于2015/10/29 关键词:Docker,容器,持续集成,持续发布,CI,私有云 本文档适用人员:广义 ...

  7. 理解 neutron(15):Neutron Linux Bridge + VLAN/VXLAN 虚拟网络

    学习 Neutron 系列文章: (1)Neutron 所实现的虚拟化网络 (2)Neutron OpenvSwitch + VLAN 虚拟网络 (3)Neutron OpenvSwitch + GR ...

  8. Windows Sockets 错误码及出错原因

    From: http://blog.csdn.net/mjay1234/article/details/7684316 Windows Sockets在头文件winsock.h中定义了所有的错误码,它 ...

  9. ESXI主机的Management网络管理了什么?

    上一篇博客聊了下为什么要设计ESXI主机的vMotion网络和Management网络分开,周末在群里碰到一个有意思的问题,也是关于Management网络的,拿出来和大家分享下. 大家都知道,我们通 ...

最新文章

  1. 任务调度算法题Java_一个任务调度问题-----算法导论
  2. 树莓派~Ubuntu~OpenCV
  3. linux cenots 查看cpu核数
  4. jQuery的链式操作
  5. 架构师之路 扩充字段_扩大您作为设计师的业务影响力的四个基础
  6. 一个 SQL 同时验证帐号是否存在、密码是否正确
  7. ALBERT、XLNet,NLP技术发展太快,如何才能跟得上节奏?
  8. 华为面试改革,我们该怎么跟进?
  9. 查询Linux充电时间,【充电】Linux学习(二)——常用的linux命令
  10. “欣喜”和“郁闷”交织的2006
  11. redis双写一致性问题
  12. JAVA王思聪吃热狗程序_王思聪吃热狗什么梗?
  13. 网站建设教程:企业怎么自己建网站?
  14. 利用Python自动生成小学生加减乘除口算考试题卷
  15. 一个月薪 12000 的北京程序员的真实生活 !
  16. [直流有刷电机步进电机]驱动芯片AS4950完美替代A4950/DRV8870/AT8870/TMI8870/G2057
  17. windows下putty自动登录和窗口显示IP
  18. oozie:java.lang.NumberFormatException: For input string: “30s“
  19. 【论文分享】Effective Seed Scheduling for Fuzzing with Graph Centrality Analysis
  20. 清华大学python吴萍答案_第732章 清华大学计算机系的扛把子

热门文章

  1. html语义化标签 例子,0820作业:HTML5新增语义化标签及实战总结
  2. 谈谈深度学习目标检测中的遮挡问题
  3. Navicat使用timestamp类型,设置默认使用当前时间
  4. sharemouse切窗口就锁定了什么原因_iPhone 提示“Apple ID 已锁定”是什么原因?
  5. 基于微信小程序的校园体育馆预约系统.docx
  6. C#ListBox控件
  7. html打造动画【系列4】- 哆啦a梦
  8. 计算机维修技能培训,计算机维修基本技能培训大纲.doc
  9. struts2框架的总结
  10. 各种管理系统术语,OMS、WMS、CRM...