mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-25 11:15:39 +00:00
Polish Docker workflow formatting
This commit is contained in:
@@ -59,7 +59,7 @@ nameserver 114.114.114.114
|
||||
$ docker run --dns-search=example.com myapp
|
||||
```
|
||||
|
||||
#### 3. --hostname (-h)
|
||||
#### 3. --hostname 与 -h
|
||||
|
||||
设置容器的主机名。
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ ghi789... none null local
|
||||
| **overlay** | 跨主机网络 | Docker Swarm 集群 |
|
||||
| **macvlan** | 容器拥有独立 MAC 地址 | 需要直接接入物理网络 |
|
||||
|
||||
### 9.2.2 Bridge 网络 (默认)
|
||||
### 9.2.2 Bridge 网络:默认
|
||||
|
||||
Bridge 是 Docker 默认使用的网络模式。Docker 启动时会自动创建 `docker0` 虚拟网桥,所有未指定网络的容器都会连接到这个网桥上。
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Overlay 网络在现有网络基础上建立虚拟网络,允许容器跨宿主
|
||||
|
||||
Overlay 网络通过隧道封装技术(通常是 VXLAN)将容器网络流量封装在宿主机物理网络的 UDP 数据包中传输。
|
||||
|
||||
```
|
||||
```text
|
||||
容器 A (192.168.0.2)
|
||||
↓
|
||||
veth 对
|
||||
@@ -250,7 +250,7 @@ Docker 内置 DNS 服务器,但 DNS 解析涉及多个层面的配置。
|
||||
|
||||
#### DNS 解析流程
|
||||
|
||||
```
|
||||
```text
|
||||
容器应用 (dig www.example.com)
|
||||
↓
|
||||
容器内 /etc/resolv.conf (127.0.0.11:53)
|
||||
|
||||
Reference in New Issue
Block a user