Docker simple recording mode network

docker Network mode there are five, namely none, host, container, bridge (the default mode), custom mode
we all know, docker, which is used linux container of namespaces resource isolation techniques such as PID Namespace isolation processes, Mount Namespace isolation file system, network Namespace isolation networks


1.bridge Mode
This mode is the default mode network docker, you can use docker inspect the vessel name view, you can see in the Network field, the specific use of the network mode, or custom network name, you can use docker inspect network network mode to see such a network mode has several containers, such as docker inspect network none / bridge / host , container in this default mode network can be considered as a separate container to a virtual machine, the container will have its own ip address, similar vmware in the nat mode
2.host mode
this mode is similar vmware in bridge mode, use this mode, the container does not own ip address, start a host mode of container, the container can be seen in his ip is bridged host, which is also used in containers and ifconfig host, view the contents are consistent
3.none mode
this mode container without their own network, for example, may only need to write the disk will be used in batch tasks this mode
4.container mode
in this mode, you need to specify another network while creating a container, new The vessel will be built and a container existing share a network namespaces, the container will not create your own card, configure your own ip, but specified that container and shared ip, port range, etc., while, in the file system and and other aspects of the process list, or isolation of two containers

Guess you like

Origin blog.51cto.com/11093860/2485925