{
  "id": "docker/dockerfile-parse-error-missing-from",
  "signature": "failed to parse Dockerfile: unexpected end of file, expected from",
  "signature_zh": "解析 Dockerfile 失败：意外的文件结尾，期望 FROM",
  "regex": "failed to parse Dockerfile: unexpected end of file, expected from",
  "domain": "docker",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The Dockerfile is empty or does not start with a FROM instruction, which is mandatory as the first non-comment line.",
  "root_cause_type": "generic",
  "root_cause_zh": "Dockerfile 为空或没有以 FROM 指令开头，FROM 是第一个非注释行所必需的。",
  "versions": [
    {
      "version": "Docker 24.0.5",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Docker 25.0.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "# comment",
      "why_fails": "Adding a comment before FROM is allowed, but an empty file or missing FROM still fails.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "FROM scratch",
      "why_fails": "Using a different base image syntax (e.g., 'FROM scratch') is valid, but if missing entirely it still fails.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Ensure Dockerfile starts with a valid FROM instruction, e.g.: FROM ubuntu:22.04",
      "success_rate": 0.95,
      "how": "Ensure Dockerfile starts with a valid FROM instruction, e.g.: FROM ubuntu:22.04",
      "condition": "",
      "sources": []
    },
    {
      "action": "Check if Dockerfile is empty: cat Dockerfile. If empty, add FROM instruction.",
      "success_rate": 0.9,
      "how": "Check if Dockerfile is empty: cat Dockerfile. If empty, add FROM instruction.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use -f flag to specify a non-standard Dockerfile path: docker build -f /path/to/Dockerfile .",
      "success_rate": 0.85,
      "how": "Use -f flag to specify a non-standard Dockerfile path: docker build -f /path/to/Dockerfile .",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Ensure Dockerfile starts with a valid FROM instruction, e.g.: FROM ubuntu:22.04",
    "Check if Dockerfile is empty: cat Dockerfile. If empty, add FROM instruction.",
    "Use -f flag to specify a non-standard Dockerfile path: docker build -f /path/to/Dockerfile ."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.docker.com/engine/reference/builder/#from",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.95,
  "resolvable": "true",
  "first_seen": "2023-09-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}