mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-25 03:05:32 +00:00
Add blank lines before headers
This commit is contained in:
@@ -53,6 +53,7 @@ PID Namespace 负责进程 ID 的隔离,使得容器内的进程彼此不可
|
||||
#### PID 隔离效果
|
||||
|
||||
```bash
|
||||
|
||||
## 宿主机上查看进程
|
||||
|
||||
$ ps aux | grep nginx
|
||||
@@ -154,6 +155,7 @@ UTS Namespace 主要用于隔离主机名和域名。
|
||||
#### UTS 隔离效果
|
||||
|
||||
```bash
|
||||
|
||||
## 宿主机
|
||||
|
||||
$ hostname
|
||||
@@ -233,6 +235,7 @@ flowchart LR
|
||||
#### 实验 1:UTS Namespace
|
||||
|
||||
```bash
|
||||
|
||||
## 创建新的 UTS namespace 并启动 shell
|
||||
|
||||
$ sudo unshare --uts /bin/bash
|
||||
@@ -253,6 +256,7 @@ my-server
|
||||
#### 实验 2:PID Namespace
|
||||
|
||||
```bash
|
||||
|
||||
## 创建新的 PID 和 MNT namespace
|
||||
|
||||
$ sudo unshare --pid --mount --fork /bin/bash
|
||||
@@ -272,6 +276,7 @@ root 8 0.0 0.0 10072 3200 pts/0 R+ 10:00 0:00 ps aux
|
||||
#### 实验 3:NET Namespace
|
||||
|
||||
```bash
|
||||
|
||||
## 创建新的网络 namespace
|
||||
|
||||
$ sudo unshare --net /bin/bash
|
||||
|
||||
Reference in New Issue
Block a user