mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-12 12:51:08 +00:00
Simplify words and fix format issues
This commit is contained in:
@@ -52,8 +52,6 @@ PID Namespace 负责进程 ID 的隔离,使得容器内的进程彼此不可
|
||||
|
||||
#### PID 隔离效果
|
||||
|
||||
运行以下命令:
|
||||
|
||||
```bash
|
||||
## 宿主机上查看进程
|
||||
|
||||
@@ -141,8 +139,6 @@ MNT Namespace 负责文件系统挂载点的隔离,确保容器看到独立的
|
||||
|
||||
#### 与 chroot 的区别
|
||||
|
||||
相关信息如下表:
|
||||
|
||||
| 特性 | chroot | MNT Namespace |
|
||||
|------|--------|---------------|
|
||||
| 安全性 | 可以逃逸 | 更安全 |
|
||||
@@ -161,8 +157,6 @@ UTS Namespace 主要用于隔离主机名和域名。
|
||||
|
||||
#### UTS 隔离效果
|
||||
|
||||
运行以下命令:
|
||||
|
||||
```bash
|
||||
## 宿主机
|
||||
|
||||
@@ -244,8 +238,6 @@ flowchart LR
|
||||
|
||||
#### 实验 1:UTS Namespace
|
||||
|
||||
运行以下命令:
|
||||
|
||||
```bash
|
||||
## 创建新的 UTS namespace 并启动 shell
|
||||
|
||||
@@ -266,8 +258,6 @@ my-server
|
||||
|
||||
#### 实验 2:PID Namespace
|
||||
|
||||
运行以下命令:
|
||||
|
||||
```bash
|
||||
## 创建新的 PID 和 MNT namespace
|
||||
|
||||
@@ -287,8 +277,6 @@ root 8 0.0 0.0 10072 3200 pts/0 R+ 10:00 0:00 ps aux
|
||||
|
||||
#### 实验 3:NET Namespace
|
||||
|
||||
运行以下命令:
|
||||
|
||||
```bash
|
||||
## 创建新的网络 namespace
|
||||
|
||||
|
||||
Reference in New Issue
Block a user