Size: 357
Comment:
|
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