1 1 1 1 1 1 1 10benben

2023-01-10   ES  

User custom network driver has three: Bridge, Overlay and Macvlan. Overlay and Macvlan are used to create cross -host networks.
Specify the Bridge driver to create a network:
在这里插入图片描述can see a new bridge BR-87200B9D7FF4. The 87200B9D7FF4 here is exactly the short ID of the new Bridge network My_net. Execute the docker network inspect to see the following My_net configuration information:
在这里插入图片描述Here Subnet is the IP network section of Docker automatically allocated.
We can also specify the IP network segment by —Subset and – Gateway:
在这里插入图片描述The container uses a new network to be specified by –Network when it starts.
在这里插入图片描述So far, the container’s IP is all allocated from the Subnet. We can specify a static IP by –IP itself.
在这里插入图片描述Note: Only use the network created by – Subnet to specify the static IP. When the My_net is created, it is not specified -SUBNET, so it cannot be used -IP
The container under the same net bridge can be ping to each other
在这里插入图片描述The container under different network bridges If you want to connect, you can add a network bridge to one container.
Through Docker Network Connect:
在这里插入图片描述
At this time, you can ping through

source

Related Posts

IOS development III controller use and custom label barbar The concept of

qt configuration system new project function

Spring Learning Notes-Bean initialization & destruction

Collection -01 -Comparable and Comparators

1 1 1 1 1 1 1 10benben

Random Posts

linux C Learn #include

EasyStorr, more elegant and convenient access to data objects, accessing the local area like MAP.

GO and Java how to handle the concurrent and intersection of the two arrays

Read the HDFS directory and display the content in the file on the web page

Android progress bar style