- Docker and Kubernetes for Java Developers
- Jaroslaw Krochmalski
- 220字
- 2021-07-02 18:44:52
Bridge
This is the default network type in Docker. When the Docker service daemon starts, it configures a virtual bridge, named docker0. If you do not specify a network with the docker run -net=<NETWORK> option, the Docker daemon will connect the container to the bridge network by default. Also, if you create a new container, it will be connected to the bridge network. For each container that Docker creates, it allocates a virtual Ethernet device which will be attached to the bridge. The virtual Ethernet device is mapped to appear as eth0 in the container, using Linux namespaces, as you can see in the following diagram:

The in-container eth0 interface is given an IP address from the bridge's address range. In other words, Docker will find a free IP address from the range available on the bridge and will configure the container's eth0 interface with that IP address. From now on, if the new container wants to, for example, connect to the Internet, it will use the bridge; the host's own IP address. The bridge will automatically forward packets between any other network interfaces that are attached to it and also allow containers to communicate with the host machine, as well as with the containers on the same host. The bridge network will probably be the most frequently used one.
- Learn ECMAScript(Second Edition)
- R語言經(jīng)典實例(原書第2版)
- PostgreSQL Cookbook
- Developing Middleware in Java EE 8
- Xamarin.Forms Projects
- 程序員修煉之道:通向務(wù)實的最高境界(第2版)
- Java EE 7 Performance Tuning and Optimization
- Working with Odoo
- 領(lǐng)域驅(qū)動設(shè)計:軟件核心復雜性應(yīng)對之道(修訂版)
- Raspberry Pi Robotic Blueprints
- Mastering Docker
- Arduino可穿戴設(shè)備開發(fā)
- 軟件測試(慕課版)
- OpenCV:Computer Vision Projects with Python
- Head First Go語言程序設(shè)計