{
  "id": "docker/executable-not-found-in-path",
  "signature": "docker: Error response from daemon: Container command '/usr/local/bin/myapp' not found or does not exist.",
  "signature_zh": "docker：守护进程错误响应：容器命令 '/usr/local/bin/myapp' 未找到或不存在。",
  "regex": "command.*not found or does not exist",
  "domain": "docker",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "CMD or ENTRYPOINT in Dockerfile references a binary path that does not exist inside the container image.",
  "root_cause_type": "generic",
  "root_cause_zh": "Dockerfile 中的 CMD 或 ENTRYPOINT 引用了容器镜像中不存在的二进制文件路径。",
  "versions": [
    {
      "version": "Docker 20.10.24",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Docker 24.0.7",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Changing CMD to a different path without verifying the file's existence in the built image repeats the same error.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Adding RUN ls /usr/local/bin/ in the Dockerfile may not reflect the final image if later stages modify the filesystem.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Inspect the image with 'docker run --rm <image> ls /usr/local/bin/' to list actual binaries, then correct the CMD path.",
      "success_rate": 0.95,
      "how": "Inspect the image with 'docker run --rm <image> ls /usr/local/bin/' to list actual binaries, then correct the CMD path.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use absolute path in ENTRYPOINT and ensure the binary is installed via RUN commands, e.g., COPY --from=builder /app/myapp /usr/local/bin/myapp.",
      "success_rate": 0.9,
      "how": "Use absolute path in ENTRYPOINT and ensure the binary is installed via RUN commands, e.g., COPY --from=builder /app/myapp /usr/local/bin/myapp.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "使用 'docker run --rm <image> ls /usr/local/bin/' 检查镜像中的实际二进制文件，然后更正 CMD 路径。",
    "在 ENTRYPOINT 中使用绝对路径，并通过 RUN 命令确保二进制文件已安装，例如 COPY --from=builder /app/myapp /usr/local/bin/myapp。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.docker.com/engine/reference/builder/#cmd",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2024-01-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}