Docker entry and application of real container network

  1. Network mode

• bridge -net = bridge the default network, create a bridge after docker0 Docker start, create a default container is also added to the bridge in. 
• host -net = host container does not get a separate network namespace, but with a common host. This means that the container does not have its own network card information, but the use of the host. In addition to container network, others are isolated. 
• none -net = none to obtain independent network namespace, but does not make any network configuration container, we need to be manually configured. 
• container -net = container: Name / ID specified container using the same network namespace, have the same network configuration information, in addition to the two containers networks are still isolated from the other. 
• Customizing the default network bridge with the same principle, but custom network has internal DNS discovery, can communicate over the network between the vessel name or host name of the vessel

2. A container network access principles

Pictures .png




Guess you like

Origin blog.51cto.com/dengaosky/2426409