{
  "id": "docker/gpg-key-expired",
  "signature": "W: GPG error: http://deb.debian.org/debian bullseye InRelease: The following signatures couldn't be verified because the public key is not available",
  "signature_zh": "W: GPG错误：http://deb.debian.org/debian bullseye InRelease：无法验证签名，因为没有公钥",
  "regex": "GPG error.*The following signatures couldn't be verified|public key is not available",
  "domain": "docker",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "Docker build uses a cached base image with outdated apt repository GPG keys, causing apt-get update to fail on signature verification.",
  "root_cause_type": "generic",
  "root_cause_zh": "Docker构建使用了带有过时apt仓库GPG密钥的缓存基础镜像，导致apt-get update在签名验证时失败。",
  "versions": [
    {
      "version": "Docker 24.0.6",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Debian 11 (bullseye)",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Ubuntu 22.04",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Manually importing the key in Dockerfile with apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <key> often fails because apt-key is deprecated and keyserver may be unreachable.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Removing the entire apt list and retrying without updating the base image still uses the same cached layer with broken keys.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Add --no-cache flag to force rebuild: docker build --no-cache -t my_image .",
      "success_rate": 0.9,
      "how": "Add --no-cache flag to force rebuild: docker build --no-cache -t my_image .",
      "condition": "",
      "sources": []
    },
    {
      "action": "Update the base image to latest version: RUN apt-get update && apt-get install -y --allow-unauthenticated gnupg && curl -fsSL https://deb.debian.org/debian/archive-keyring.gpg | gpg --dearmor -o /usr/share/keyrings/debian-archive-keyring.gpg",
      "success_rate": 0.85,
      "how": "Update the base image to latest version: RUN apt-get update && apt-get install -y --allow-unauthenticated gnupg && curl -fsSL https://deb.debian.org/debian/archive-keyring.gpg | gpg --dearmor -o /usr/share/keyrings/debian-archive-keyring.gpg",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "添加--no-cache标志强制重建：docker build --no-cache -t my_image .",
    "更新基础镜像到最新版本：RUN apt-get update && apt-get install -y --allow-unauthenticated gnupg && curl -fsSL https://deb.debian.org/debian/archive-keyring.gpg | gpg --dearmor -o /usr/share/keyrings/debian-archive-keyring.gpg"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.docker.com/engine/reference/builder/#no-cache",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.82,
  "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": []
}