Simplify words and fix format issues

This commit is contained in:
Baohua Yang
2026-02-24 22:01:02 -08:00
parent c44cbfcd62
commit d6e0838807
124 changed files with 45 additions and 1073 deletions

View File

@@ -13,12 +13,8 @@
### 5.1.2 新建并启动
本节涵盖了相关内容与详细描述主要探讨以下几个方面
#### 基本语法
运行以下命令
```bash
docker run [选项] 镜像 [命令] [参数...]
```
@@ -84,12 +80,8 @@ flowchart TD
### 5.1.4 常用启动选项
本节涵盖了相关内容与详细描述主要探讨以下几个方面
#### 基础选项
相关信息如下表
| 选项 | 说明 | 示例 |
|------|------|------|
| `-d` | 后台运行 (detach)| `docker run -d nginx` |
@@ -99,8 +91,6 @@ flowchart TD
#### 端口映射
运行以下命令
```bash
## 将容器的 80 端口映射到宿主机的 8080 端口
@@ -117,8 +107,6 @@ $ docker run -d -p 127.0.0.1:8080:80 nginx
#### 数据卷挂载
运行以下命令
```bash
## 挂载命名卷
@@ -135,8 +123,6 @@ $ docker run -v /host/path:/container/path:ro nginx
#### 环境变量
运行以下命令
```bash
## 设置单个环境变量
@@ -149,8 +135,6 @@ $ docker run --env-file .env myapp
#### 资源限制
运行以下命令
```bash
## 限制内存
@@ -198,8 +182,6 @@ root@ba267838cc1b:/# ps
### 5.1.7 常见问题
本节涵盖了相关内容与详细描述主要探讨以下几个方面
#### Q容器启动后立即退出
**原因**主进程执行完毕或无法保持运行