title: Does a docker container have its own TCP/IP stack?
body: <p>I'm trying to understand what's happening under the hood to a network packet coming from the wire connected to the host machine and directed to an application inside a Docker container.</p>
  
  <p>If it were a classic VM, I know that a packet arriving on the host would be transmitted by the hypervisor (say VMware, VBox etc.) to the virtual NIC of the VM and from there through the TCP/IP stack of the guest OS, finally reaching the application.</p>
  
  <p>In the case of Docker, I know that a packet coming on the host machine is forwarded from the network interface of the host to the <code>docker0</code> bridge, that is connected to a <code>veth</code> pair ending on the virtual interface <code>eth0</code> inside the container. But after that? Since all Docker containers use the host kernel, is it correct to presume that the packet is processed by the TCP/IP stack of the host kernel? If so, how?</p>
  
  <p>I would really like to read a <strong>detailed</strong> explanation (or if you know a resource feel free to link it) about what's really happening under the hood. I already carefully read <a href="https://github.com/dotcloud/docker/blob/master/docs/sources/articles/networking.md" rel="noreferrer">this</a> page, but it doesn't say everything.</p>
  
  <p>Thanks in advance for your reply.</p>