<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 675" role="img" aria-labelledby="title desc">
  <title id="title">镜像、容器、运行时和仓库关系图</title>
  <desc id="desc">展示开发者构建镜像、推送仓库、运行时拉取镜像并启动容器的完整路径</desc>
  <defs>
    <linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
      <stop offset="0" stop-color="#fff7ed"/>
      <stop offset="0.55" stop-color="#ecfeff"/>
      <stop offset="1" stop-color="#f5f3ff"/>
    </linearGradient>
    <filter id="shadow" x="-20%" y="-20%" width="140%" height="140%">
      <feDropShadow dx="0" dy="10" stdDeviation="10" flood-color="#334155" flood-opacity="0.16"/>
    </filter>
    <marker id="arrow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="9" markerHeight="9" orient="auto-start-reverse">
      <path d="M0 0 L10 5 L0 10 Z" fill="#0f766e"/>
    </marker>
  </defs>
  <rect width="1200" height="675" fill="url(#bg)"/>
  <circle cx="108" cy="110" r="46" fill="#fed7aa" opacity="0.7"/>
  <circle cx="1082" cy="578" r="58" fill="#ddd6fe" opacity="0.75"/>
  <text x="70" y="70" font-size="34" font-weight="700" fill="#111827">容器是什么：从镜像到运行中的容器</text>
  <text x="72" y="106" font-size="18" fill="#475569">镜像是模板，容器是运行实例，运行时负责把模板变成进程，仓库存放和分发镜像。</text>

  <g filter="url(#shadow)">
    <rect x="70" y="190" width="210" height="250" rx="28" fill="#ffffff" stroke="#fb923c" stroke-width="3"/>
    <text x="105" y="238" font-size="24" font-weight="700" fill="#9a3412">开发目录</text>
    <rect x="112" y="270" width="126" height="32" rx="8" fill="#ffedd5"/>
    <text x="132" y="292" font-size="15" fill="#9a3412">app.py</text>
    <rect x="112" y="316" width="126" height="32" rx="8" fill="#ffedd5"/>
    <text x="124" y="338" font-size="15" fill="#9a3412">Dockerfile</text>
    <rect x="112" y="362" width="126" height="32" rx="8" fill="#ffedd5"/>
    <text x="128" y="384" font-size="15" fill="#9a3412">依赖文件</text>
    <text x="95" y="424" font-size="15" fill="#64748b">构建上下文 + 构建规则</text>
  </g>

  <g filter="url(#shadow)">
    <rect x="360" y="170" width="230" height="290" rx="28" fill="#ffffff" stroke="#14b8a6" stroke-width="3"/>
    <text x="415" y="220" font-size="25" font-weight="700" fill="#0f766e">容器镜像</text>
    <g transform="translate(415 252)">
      <rect x="0" y="0" width="120" height="34" rx="10" fill="#ccfbf1"/>
      <rect x="0" y="48" width="120" height="34" rx="10" fill="#99f6e4"/>
      <rect x="0" y="96" width="120" height="34" rx="10" fill="#5eead4"/>
      <rect x="0" y="144" width="120" height="34" rx="10" fill="#2dd4bf"/>
      <text x="28" y="22" font-size="15" fill="#134e4a">基础层</text>
      <text x="28" y="70" font-size="15" fill="#134e4a">依赖层</text>
      <text x="28" y="118" font-size="15" fill="#134e4a">应用层</text>
      <text x="28" y="166" font-size="15" fill="#134e4a">配置层</text>
    </g>
    <text x="397" y="430" font-size="15" fill="#64748b">只读分层包，可复制分发</text>
  </g>

  <g filter="url(#shadow)">
    <rect x="680" y="150" width="210" height="230" rx="28" fill="#ffffff" stroke="#8b5cf6" stroke-width="3"/>
    <text x="735" y="200" font-size="25" font-weight="700" fill="#6d28d9">镜像仓库</text>
    <path d="M734 242 h102 a22 22 0 0 1 22 22 v56 a22 22 0 0 1 -22 22 h-102 a22 22 0 0 1 -22 -22 v-56 a22 22 0 0 1 22 -22z" fill="#ede9fe" stroke="#a78bfa" stroke-width="2"/>
    <path d="M712 276 h146" stroke="#a78bfa" stroke-width="2"/>
    <path d="M712 310 h146" stroke="#a78bfa" stroke-width="2"/>
    <text x="735" y="272" font-size="14" fill="#5b21b6">app:1.4.2</text>
    <text x="735" y="306" font-size="14" fill="#5b21b6">app:stable</text>
    <text x="735" y="340" font-size="14" fill="#5b21b6">app:sha-8f3c</text>
  </g>

  <g filter="url(#shadow)">
    <rect x="650" y="445" width="430" height="145" rx="28" fill="#ffffff" stroke="#0ea5e9" stroke-width="3"/>
    <text x="685" y="492" font-size="24" font-weight="700" fill="#0369a1">容器运行时 + 主机内核</text>
    <rect x="700" y="520" width="150" height="44" rx="16" fill="#e0f2fe"/>
    <text x="724" y="548" font-size="16" fill="#075985">containerd / CRI-O</text>
    <rect x="880" y="520" width="150" height="44" rx="16" fill="#dbeafe"/>
    <text x="914" y="548" font-size="16" fill="#1e40af">Linux Kernel</text>
  </g>

  <g filter="url(#shadow)">
    <rect x="910" y="170" width="210" height="210" rx="28" fill="#ffffff" stroke="#f59e0b" stroke-width="3"/>
    <text x="966" y="220" font-size="25" font-weight="700" fill="#92400e">容器</text>
    <circle cx="1015" cy="282" r="42" fill="#fef3c7" stroke="#f59e0b" stroke-width="3"/>
    <text x="986" y="289" font-size="18" font-weight="700" fill="#92400e">进程</text>
    <text x="945" y="348" font-size="15" fill="#64748b">镜像实例 + 可写层</text>
  </g>

  <path d="M282 315 C320 312 330 310 358 308" stroke="#0f766e" stroke-width="5" fill="none" marker-end="url(#arrow)"/>
  <text x="296" y="286" font-size="16" fill="#0f766e">build</text>
  <path d="M592 285 C628 260 642 248 678 245" stroke="#0f766e" stroke-width="5" fill="none" marker-end="url(#arrow)"/>
  <text x="620" y="238" font-size="16" fill="#0f766e">push</text>
  <path d="M786 382 C787 410 804 430 830 444" stroke="#0f766e" stroke-width="5" fill="none" marker-end="url(#arrow)"/>
  <text x="806" y="420" font-size="16" fill="#0f766e">pull</text>
  <path d="M988 445 C1002 420 1010 404 1012 382" stroke="#0f766e" stroke-width="5" fill="none" marker-end="url(#arrow)"/>
  <text x="1020" y="420" font-size="16" fill="#0f766e">run</text>

  <rect x="92" y="590" width="1015" height="42" rx="21" fill="#ffffff" opacity="0.8"/>
  <text x="120" y="617" font-size="17" fill="#334155">记忆法：仓库像软件货架，镜像像安装包模板，运行时像启动器，容器像正在运行的应用进程。</text>
</svg>
