From 58504e931671565762a5d4354bdbee501b1f3df8 Mon Sep 17 00:00:00 2001 From: yeasy Date: Tue, 19 May 2026 19:45:02 -0700 Subject: [PATCH] fix(review-fixes): surgical content corrections from web-verified library deep review --- 07_dockerfile/7.4_cmd.md | 4 ++-- 07_dockerfile/7.5_entrypoint.md | 2 +- 11_compose/11.5_compose_file.md | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/07_dockerfile/7.4_cmd.md b/07_dockerfile/7.4_cmd.md index 1889cf5..9c0a69c 100644 --- a/07_dockerfile/7.4_cmd.md +++ b/07_dockerfile/7.4_cmd.md @@ -31,9 +31,9 @@ CMD 有三种格式: | 格式 | 语法 | 推荐程度 | |------|------|---------| -| **exec 格式**| `CMD [“可执行文件”, “参数1”, “参数2”]` | ✅**推荐** | +| **exec 格式**| `CMD ["可执行文件", "参数1", "参数2"]` | ✅**推荐** | | **shell 格式** | `CMD 命令 参数1 参数2` | ⚠️ 简单场景 | -| **参数格式** | `CMD [“参数1”, “参数2”]` | 配合 ENTRYPOINT | +| **参数格式** | `CMD ["参数1", "参数2"]` | 配合 ENTRYPOINT | #### exec 格式:推荐 diff --git a/07_dockerfile/7.5_entrypoint.md b/07_dockerfile/7.5_entrypoint.md index edefe01..0cc427c 100644 --- a/07_dockerfile/7.5_entrypoint.md +++ b/07_dockerfile/7.5_entrypoint.md @@ -40,7 +40,7 @@ | 格式 | 语法 | 推荐程度 | |------|------|---------| -| **exec 格式**| `ENTRYPOINT [“可执行文件”, “参数1”]` | ✅**推荐** | +| **exec 格式**| `ENTRYPOINT ["可执行文件", "参数1"]` | ✅**推荐** | | **shell 格式** | `ENTRYPOINT 命令 参数` | ⚠️ 不推荐 | ```docker diff --git a/11_compose/11.5_compose_file.md b/11_compose/11.5_compose_file.md index fc5bcd1..73711a8 100644 --- a/11_compose/11.5_compose_file.md +++ b/11_compose/11.5_compose_file.md @@ -150,7 +150,7 @@ services: redis: image: redis healthcheck: - test: [“CMD”, “redis-cli”, “ping”] + test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 3s retries: 5 @@ -158,7 +158,7 @@ services: db: image: postgres healthcheck: - test: [“CMD-SHELL”, “pg_isready -U postgres”] + test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 3s retries: 5