Continue to fix format issues

This commit is contained in:
Baohua Yang
2026-02-21 10:47:37 -08:00
parent 47cfc173a6
commit 5ae315c9dd
48 changed files with 667 additions and 727 deletions

View File

@@ -135,18 +135,3 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
避免在 Dockerfile 中频繁切换 SHELL这会使构建过程难以理解和调试尽量在头部定义一次即可
---
### 本章小结
| 要点 | 说明 |
|------|------|
| **作用** | 更改 RUN/CMD/ENTRYPOINT 的默认 shell |
| **Linux 默认** | `["/bin/sh", "-c"]` |
| **Windows 默认** | `["cmd", "/S", "/C"]` |
| **推荐用法** | `SHELL ["/bin/bash", "-o", "pipefail", "-c"]` |
| **影响范围** | 后续所有使用 shell 格式的指令 |
### 延伸阅读
- [RUN 指令](../04_image/4.5_build.md)执行命令
- [Dockerfile 最佳实践](../16_appendix/16.1_best_practices.md)错误处理与调试