{
  "id": "cicd/docker-buildkit-cache-mount-error",
  "signature": "ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref moby::abc123: \"/some/path\": not found",
  "signature_zh": "错误：无法求解：无法计算缓存键：无法计算引用 moby::abc123 的校验和：\"/some/path\"：未找到",
  "regex": "failed to compute cache key.*failed to calculate checksum.*not found",
  "domain": "cicd",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "Docker BuildKit cache mount target path does not exist or is invalid, often due to a missing directory in the build context or a typo in the --mount=type=cache,target= path.",
  "root_cause_type": "generic",
  "root_cause_zh": "Docker BuildKit 缓存挂载目标路径不存在或无效，通常由于构建上下文中缺少目录或 --mount=type=cache,target= 路径拼写错误。",
  "versions": [
    {
      "version": "Docker 24.0.5",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Docker 25.0.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "BuildKit v0.12.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Running docker system prune -a removes all cache but doesn't fix the underlying path issue; cache mounts still fail.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Adding --no-cache flag forces rebuild but doesn't address the missing directory; error persists on next build.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Changing the cache mount from type=cache to type=bind may work but defeats caching purpose and can cause permission issues.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Ensure the cache mount target directory exists in the Dockerfile by adding a RUN mkdir -p /some/path before the cache mount instruction.",
      "success_rate": 0.95,
      "how": "Ensure the cache mount target directory exists in the Dockerfile by adding a RUN mkdir -p /some/path before the cache mount instruction.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use absolute paths and avoid symlinks: change --mount=type=cache,target=/var/cache/apt to a unique path like /cache/apt and ensure no trailing spaces.",
      "success_rate": 0.85,
      "how": "Use absolute paths and avoid symlinks: change --mount=type=cache,target=/var/cache/apt to a unique path like /cache/apt and ensure no trailing spaces.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Ensure the cache mount target directory exists in the Dockerfile by adding a RUN mkdir -p /some/path before the cache mount instruction.",
    "Use absolute paths and avoid symlinks: change --mount=type=cache,target=/var/cache/apt to a unique path like /cache/apt and ensure no trailing spaces."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.docker.com/build/cache/",
  "official_doc_section": null,
  "error_code": "BUILDKIT_CACHE_MOUNT",
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2023-11-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}