Differences between revisions 4 and 6 (spanning 2 versions)
Revision 4 as of 2021-11-18 21:37:58
Size: 357
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:
`dockerd(8)` manages the network for all containers.

The networking model is tightly coupled to `iptables(8)`.
Line 10: Line 13:
== Container Networking == == Bridge Networks and the Default Network ==
Line 12: Line 15:
For information on bridge networks between containers, see [[Docker/BridgeNetworks|Bridge Networks]]. 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]].

----



== Disabling ==

To disable networking for a container, try:

{{{
docker run \
  --network=none \
  hello-world
}}}
Line 20: Line 37:
To run a container on the host's own network, try: To attach a container to the host's own network, try:
Line 23: Line 40:
docker run ... --network=host 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


CategoryRicottone

Docker/Networking (last edited 2023-04-04 20:10:24 by DominicRicottone)