Docker Networking Concepts: Difference between revisions
(→TODO) |
|||
Line 18: | Line 18: | ||
=Overview= | =Overview= | ||
Docker's networking subsystem uses drivers. Docker comes with several drivers, and others can be developed and deployed. The drivers available by default are described below: | |||
=Network Drivers= | |||
==bridge== | |||
{{External|https://docs.docker.com/network/bridge/}} | |||
This is the default network driver. | |||
==host== | |||
==overlay== | |||
==macvlan== | |||
==none== | |||
=Docker Server Networking= | =Docker Server Networking= |
Revision as of 18:56, 25 April 2018
External
- https://docs.docker.com/engine/userguide/networking/
- https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach
Internal
TODO
- https://docs.docker.com/network/bridge/
- https://docs.docker.com/network/host/
- https://docs.docker.com/network/overlay/
- https://docs.docker.com/network/macvlan/
- https://docs.docker.com/network/none/
- https://docs.docker.com/network/iptables/
Overview
Docker's networking subsystem uses drivers. Docker comes with several drivers, and others can be developed and deployed. The drivers available by default are described below:
Network Drivers
bridge
This is the default network driver.
host
overlay
macvlan
none
Docker Server Networking
Container Networking
A Docker container behaves like a host on a private network. Each container has its own virtual network stack, Ethernet interface and its own IP address. All containers managed by the same server are connected via bridge interfaces to a default virtual network and can talk to each other directly. Logically, they behave like physical machines connected through a common Ethernet switch. In order to get to the host and the outside world, the traffic from the containers goes over an interface called docker0: the Docker server acts as a virtual bridge for outbound traffic. The Docker server also allows containers to "bind" to ports on the host, so outside traffic can reach them: the traffic passes over a proxy that is part of the Docker server before getting to containers.
The default mode can be changed, for example --net configures the server to allow containers to use the host's own network device and address.
Also see: