Size: 522
Comment:
|
← Revision 6 as of 2023-04-04 20:10:24 ⇥
Size: 822
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 3: | Line 3: |
For information on bridge networks between containers, see [[Docker/BridgeNetworks|Bridge Networks]]. | `dockerd(8)` manages the network for all containers. The networking model is tightly coupled to `iptables(8)`. |
Line 11: | Line 13: |
== Default Network == | == Bridge Networks and the Default Network == |
Line 13: | Line 15: |
All containers are attached to a network. If one is not specified, the default network is used. This network is special in that there is no name resolution; the only way to communicate between containers is their ephemeral IP addresses. | The default behavior for a new container is to use a '''bridge network'''. Furthermore, if a bridge network is not specified, the special '''default network''' is used. For more information on all of these, see [[Docker/BridgeNetworks|here]]. |
Line 19: | Line 21: |
== Creation == | == Disabling == To disable networking for a container, try: {{{ docker run \ --network=none \ hello-world }}} ---- |
Line 23: | Line 35: |
=== Name Resolution === | == Host Network == |
Line 25: | Line 37: |
To attach a container to the host's own network, try: {{{ docker run --detach --name my-haproxy \ --network=host \ haproxy:latest }}} |
Docker Networking
dockerd(8) manages the network for all containers.
The networking model is tightly coupled to iptables(8).
Bridge Networks and the Default Network
The default behavior for a new container is to use a bridge network. Furthermore, if a bridge network is not specified, the special default network is used. For more information on all of these, see here.
Disabling
To disable networking for a container, try:
docker run \ --network=none \ hello-world
Host Network
To attach a container to the host's own network, try:
docker run --detach --name my-haproxy \ --network=host \ haproxy:latest