{
  "id": "docker/dockerfile-parse-error-invalid-escape",
  "signature": "failed to solve: dockerfile parse error on line 5: unknown instruction: ESCAPE",
  "signature_zh": "求解失败：第 5 行 Dockerfile 解析错误：未知指令：ESCAPE",
  "regex": "dockerfile parse error on line \\d+: unknown instruction: ESCAPE",
  "domain": "docker",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "The Dockerfile contains a syntax error where 'ESCAPE' is used incorrectly, likely a typo for 'SHELL' or a misplaced escape directive, causing the parser to treat it as an unknown instruction.",
  "root_cause_type": "generic",
  "root_cause_zh": "Dockerfile 包含语法错误，'ESCAPE' 被错误使用，可能是 'SHELL' 的拼写错误或转义指令放置不当，导致解析器将其视为未知指令。",
  "versions": [
    {
      "version": "Docker 25.0.3",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "BuildKit 0.12.5",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Add a backslash before ESCAPE to escape it",
      "why_fails": "Backslash does not change the parser directive; ESCAPE is not a valid instruction in any context.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "Change the line to 'RUN ESCAPE'",
      "why_fails": "RUN ESCAPE is still invalid; ESCAPE is not a shell command.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Ignore the error and continue building with --force-rm",
      "why_fails": "BuildKit stops on parse errors; --force-rm only cleans intermediate containers, not fix syntax.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Remove the erroneous 'ESCAPE' line. If the intent was to change the escape character, use the parser directive '# escape=`' at the top of the Dockerfile (before any instructions).",
      "success_rate": 0.95,
      "how": "Remove the erroneous 'ESCAPE' line. If the intent was to change the escape character, use the parser directive '# escape=`' at the top of the Dockerfile (before any instructions).",
      "condition": "",
      "sources": []
    },
    {
      "action": "Replace 'ESCAPE' with the correct instruction, e.g., if it was meant to be a shell command, use 'RUN echo hello'.",
      "success_rate": 0.9,
      "how": "Replace 'ESCAPE' with the correct instruction, e.g., if it was meant to be a shell command, use 'RUN echo hello'.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "删除错误的 'ESCAPE' 行。如果目的是更改转义字符，请在 Dockerfile 顶部使用解析器指令 '# escape=`'（在所有指令之前）。",
    "将 'ESCAPE' 替换为正确的指令，例如，如果本意是 shell 命令，使用 'RUN echo hello'。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.docker.com/engine/reference/builder/#parser-directives",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.95,
  "resolvable": "true",
  "first_seen": "2024-06-01",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}