Node mode diagram: #docker run -it -d -network=none -name docker_non1 ubuntu-base:v3 We need to add a network card to the Docker container, configure IP, etc. That is, this Docker container has information such as NIC, IP, routing and other information. With NONE mode, the Docker container has its own Network Namespace, but does not make any network configuration for the Docker container. # Start the third containerĭocker run -it -d -p 81:80 -name nginx-web2 -link tomcat-web1:java_server nginx:web1 The custom container name may change later, then once the name changes, the program has changed, if the program is called by the container name, the container name is definitely unable to call success, replace each time There is a more trouble, so you can use the custom alias to solve, that is, the container name will change, do not modify the alias. # Start the first containerĭocker run -it -d -name tomcat-web1 -p 8801:8080 tomcat:app1ĭocker run -it -d -p 80:80 -name nginx-web1 -link tomcat-web1 nginx:web1 Randomly allocated, so if the custom name is relatively relatively fixed, it is suitable for this scenario. That is, the container between the same host can be accessed by a custom container name, such as a service front end static page using nginx, the dynamic page is Tomcat, because the container is started, the internal IP address is DHCP. The work mode of the virtual bridge is similar to the physical switch, so that all containers on the host are connected in a two-layer network through the switch.ĭocker stand-alone communication Container name interconnection The Docker container that is started on this host will connect to this virtual bridge. When the Docker process is started, a virtual bridge called Docker0 is created on the host. OVS (OpenVSwitch): Implement three-layer network devices such as VLAN, VXLAN, GRE (Generic Routing Encapsulation), SDN (Oftware Defined Network)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |