Differences between revisions 4 and 5
Revision 4 as of 2021-11-18 21:37:58
Size: 357
Comment:
Revision 5 as of 2023-04-04 19:44:05
Size: 560
Comment:
Deletions are marked like this. Additions are marked like this.
Line 12: Line 12:
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. For information on bridge networks, see [[Docker/BridgeNetworks|Bridge Networks]].
Line 14: Line 14:
---- To disable networking for a container, try:

{{{
docker run \
  --network=none \
  hello-world
}}}
Line 18: Line 24:
== Host Network == === Host Network ===
Line 20: Line 26:
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 29:
docker run ... --network=host docker run --detach --name my-haproxy \
 
--network=host \
  haproxy:latest

Docker Networking


Container Networking

The default behavior for a new container is to use a bridge network. For information on bridge networks, see Bridge Networks.

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)