Loading...
Loading...
Compare original and translation side by side
| Scenario | Use This Skill |
|---|---|
| Called by ln-780 orchestrator | Yes |
| Standalone container launch | Yes |
| Development environment setup | Yes |
| Production deployment | No, use proper CI/CD |
| 场景 | 是否使用本组件 |
|---|---|
| 由ln-780编排器调用 | 是 |
| 独立启动容器 | 是 |
| 开发环境搭建 | 是 |
| 生产环境部署 | 否,使用专业CI/CD工具 |
| Check | Failure Action |
|---|---|
| Docker daemon running | Report error with installation instructions |
| Docker Compose available | Report error, suggest installation |
| Compose file exists | Report error, list expected locations |
| Required ports free | Report conflict, suggest alternatives |
| Sufficient disk space | Warn if low space (<2GB free) |
| 检查项 | 失败处理动作 |
|---|---|
| Docker守护进程是否运行 | 报错并提供安装启动说明 |
| Docker Compose是否可用 | 报错并建议安装 |
| Compose文件是否存在 | 报错并列出预期路径 |
| 所需端口是否空闲 | 报告端口冲突并建议替代方案 |
| 磁盘空间是否充足 | 空间不足时发出警告(剩余空间<2GB) |
| Information | Purpose |
|---|---|
| Service names | Track which containers to monitor |
| Exposed ports | Know which ports to check |
| Health check definitions | Use native health checks if defined |
| Dependencies (depends_on) | Understand startup order |
| Volume mounts | Verify paths exist |
| 信息内容 | 用途 |
|---|---|
| 服务名称 | 跟踪需要监控的容器 |
| 暴露端口 | 明确需要检查的端口 |
| 健康检查定义 | 若已定义则使用原生健康检查 |
| 依赖关系(depends_on) | 明确启动顺序 |
| 卷挂载 | 验证挂载路径是否存在 |
| Aspect | Strategy |
|---|---|
| Build context | Use paths from compose file |
| Build args | Pass through from compose configuration |
| Cache | Use Docker layer cache for speed |
| Failure | Report build errors with full log |
| 方面 | 策略 |
|---|---|
| 构建上下文 | 使用Compose文件中指定的路径 |
| 构建参数 | 直接传递Compose配置中的参数 |
| 缓存 | 利用Docker层缓存提升速度 |
| 失败处理 | 报错并提供完整构建日志 |
| Aspect | Strategy |
|---|---|
| Startup order | Respect depends_on and healthcheck conditions |
| Detached mode | Run in background |
| Network | Use compose-defined networks |
| Volumes | Mount all defined volumes |
| 方面 | 策略 |
|---|---|
| 启动顺序 | 遵循depends_on和健康检查条件 |
| 后台模式 | 在后台运行容器 |
| 网络 | 使用Compose定义的网络 |
| 卷 | 挂载所有已定义的卷 |
| Condition | Strategy |
|---|---|
Service has | Use native Docker health status |
Service has | Wait for Docker health status |
| No healthcheck defined | Use external HTTP probe with retry |
| Parameter | Value | Rationale |
|---|---|---|
| Max attempts | 10 | Allow slow-starting services |
| Initial delay | 5s | Give containers time to start |
| Backoff | Exponential (5, 10, 20, 40s) | Avoid overwhelming services |
| Max total wait | 120s | Reasonable upper limit |
| Method | When to Use |
|---|---|
| Docker health status | When container has healthcheck defined |
| HTTP GET to exposed port | For web services without healthcheck |
| Container exec | For services without exposed ports |
| TCP port check | For databases and message queues |
| 条件 | 策略 |
|---|---|
服务在Compose中定义了 | 使用Docker原生健康状态 |
服务定义了 | 等待Docker健康状态 |
| 未定义健康检查 | 使用外部HTTP探测并重试 |
| 参数 | 取值 | 理由 |
|---|---|---|
| 最大尝试次数 | 10 | 为启动较慢的服务预留时间 |
| 初始延迟 | 5秒 | 给容器启动预留时间 |
| 退避策略 | 指数退避(5、10、20、40秒) | 避免压垮服务 |
| 最长总等待时间 | 120秒 | 合理的上限值 |
| 方法 | 使用场景 |
|---|---|
| Docker健康状态 | 容器已定义健康检查时 |
| 向暴露端口发送HTTP GET请求 | 无健康检查的Web服务 |
| 容器内执行命令 | 无暴露端口的服务 |
| TCP端口检查 | 数据库和消息队列服务 |
| Field | Description |
|---|---|
| containers | Array of container status objects |
| healthChecks | Array of health check results |
| accessUrls | Map of service name to access URL |
| overallStatus | healthy / unhealthy / partial |
| startupDuration | Time from launch to all healthy |
| Field | Description |
|---|---|
| name | Container name |
| service | Service name from compose |
| status | running / exited / restarting |
| health | healthy / unhealthy / starting / none |
| port | Exposed port (if any) |
| startedAt | Container start timestamp |
| Field | Description |
|---|---|
| url | Checked URL or endpoint |
| status | HTTP status code or check result |
| responseTime | Time to respond in ms |
| healthy | Boolean health status |
| 字段 | 描述 |
|---|---|
| containers | 容器状态对象数组 |
| healthChecks | 健康检查结果数组 |
| accessUrls | 服务名称到访问URL的映射 |
| overallStatus | 健康/不健康/部分健康 |
| startupDuration | 从启动到全部健康的耗时 |
| 字段 | 描述 |
|---|---|
| name | 容器名称 |
| service | Compose中的服务名称 |
| status | 运行中/已退出/重启中 |
| health | 健康/不健康/启动中/无健康检查 |
| port | 暴露端口(如有) |
| startedAt | 容器启动时间戳 |
| 字段 | 描述 |
|---|---|
| url | 检查的URL或端点 |
| status | HTTP状态码或检查结果 |
| responseTime | 响应时间(毫秒) |
| healthy | 健康状态布尔值 |
| Error Type | Action |
|---|---|
| Docker daemon not running | Report with start instructions |
| Port already in use | Report conflict, suggest docker compose down first |
| Image build failed | Report with build logs |
| Container exited | Report with container logs |
| Health check timeout | Report with last known status and logs |
| Network unreachable | Check Docker network configuration |
| 错误类型 | 处理动作 |
|---|---|
| Docker守护进程未运行 | 报错并提供启动说明 |
| 端口已被占用 | 报告冲突并建议先执行docker compose down |
| 镜像构建失败 | 报错并提供构建日志 |
| 容器已退出 | 报错并提供容器日志 |
| 健康检查超时 | 报错并提供最后已知状态和日志 |
| 网络不可达 | 检查Docker网络配置 |
| Option | Default | Description |
|---|---|---|
| keepRunning | true | Leave containers running after verification |
| stopAfter | false | Stop containers after successful verification |
| healthTimeout | 120 | Max seconds to wait for healthy status |
| showLogs | true | Show container logs on failure |
| buildFirst | true | Build images before starting |
| pullLatest | false | Pull base images before build |
| 选项 | 默认值 | 说明 |
|---|---|---|
| keepRunning | true | 验证完成后保持容器运行 |
| stopAfter | false | 验证成功后停止容器 |
| healthTimeout | 120 | 等待健康状态的最长秒数 |
| showLogs | true | 失败时显示容器日志 |
| buildFirst | true | 启动前先构建镜像 |
| pullLatest | false | 构建前拉取最新基础镜像 |
| Action | Description |
|---|---|
| Stop containers | Stop running containers, preserve data |
| Remove containers and networks | Clean up containers but keep volumes |
| Remove everything | Full cleanup including volumes and images |
| 操作 | 说明 |
|---|---|
| 停止容器 | 停止运行中的容器,保留数据 |
| 删除容器和网络 | 清理容器但保留卷 |
| 完全清理 | 清理所有内容,包括卷和镜像 |