{
  "id": "docker/tar-stream-eof-unexpected",
  "signature": "Error processing tar file(exit status 1): unexpected end of tar archive",
  "signature_zh": "处理 tar 文件时出错（退出状态 1）：tar 归档意外结束",
  "regex": "Error processing tar file\\(exit status 1\\): unexpected end of tar archive",
  "domain": "docker",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "A layer tarball in the Docker image is corrupted or truncated, often due to network interruption during pull, incomplete upload to registry, or disk I/O errors.",
  "root_cause_type": "generic",
  "root_cause_zh": "Docker 镜像中的层 tarball 损坏或截断，通常是由于拉取时的网络中断、上传到注册表不完整或磁盘 I/O 错误导致。",
  "versions": [
    {
      "version": "Docker 20.10.18",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Docker 24.0.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Registry 2.8.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Pruning removes all images and containers but does not repair the corrupted layer; the error will reappear when pulling the same image again from the same registry.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The error is due to data corruption, not timeout; reducing concurrency does not fix the underlying tarball integrity issue.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Delete the specific corrupted image layer: `docker rmi <image>:<tag>` and then re-pull the image from the registry with `docker pull <image>:<tag>`. If the error persists, the registry image itself is corrupted; push a fresh build.",
      "success_rate": 0.8,
      "how": "Delete the specific corrupted image layer: `docker rmi <image>:<tag>` and then re-pull the image from the registry with `docker pull <image>:<tag>`. If the error persists, the registry image itself is corrupted; push a fresh build.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the image is local, export and re-import: `docker save myimage:latest -o myimage.tar && docker rmi myimage:latest && docker load -i myimage.tar`. This can fix minor tar header corruption.",
      "success_rate": 0.7,
      "how": "If the image is local, export and re-import: `docker save myimage:latest -o myimage.tar && docker rmi myimage:latest && docker load -i myimage.tar`. This can fix minor tar header corruption.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Delete the specific corrupted image layer: `docker rmi <image>:<tag>` and then re-pull the image from the registry with `docker pull <image>:<tag>`. If the error persists, the registry image itself is corrupted; push a fresh build.",
    "If the image is local, export and re-import: `docker save myimage:latest -o myimage.tar && docker rmi myimage:latest && docker load -i myimage.tar`. This can fix minor tar header corruption."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.docker.com/engine/reference/commandline/save/",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.83,
  "fix_success_rate": 0.77,
  "resolvable": "true",
  "first_seen": "2023-05-18",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}