{
 "容器日誌:docker logs、日誌驅動與輪替#1": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   0,
   3,
   4,
   4,
   4
  ],
  "nodes": [
   {
    "label": "應用程式"
   },
   {
    "label": "stdout/stderr",
    "sub": "標準輸出與錯誤"
   },
   {
    "label": "容器引擎",
    "sub": "負責收集"
   },
   {
    "label": "docker logs",
    "sub": "或集中式日誌",
    "kind": "end"
   }
  ]
 },
 "容器日誌:docker logs、日誌驅動與輪替#3": {
  "type": "table",
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "head": [
   "指令",
   "用途"
  ],
  "rows": [
   [
    "docker logs web",
    "全部日誌"
   ],
   [
    "docker logs -f web",
    "持續追蹤"
   ],
   [
    "--tail 100",
    "最後 100 行"
   ],
   [
    "--since 30m",
    "最近 30 分鐘"
   ]
  ]
 },
 "容器日誌:docker logs、日誌驅動與輪替#4": {
  "type": "table",
  "reveal": [
   0,
   1,
   2,
   3
  ],
  "head": [
   "指令",
   "用途"
  ],
  "rows": [
   [
    "--since ... --until ...",
    "精確某一段時間"
   ],
   [
    "docker logs -t web",
    "顯示時間戳記"
   ],
   [
    "2>&1 | grep -i error",
    "先併入 stderr 再篩選"
   ]
  ]
 },
 "容器日誌:docker logs、日誌驅動與輪替#5": {
  "type": "table",
  "reveal": [
   0,
   1,
   2
  ],
  "head": [
   "指令",
   "用途"
  ],
  "rows": [
   [
    "compose logs -f --tail 50 app",
    "追蹤 app 最後 50 行"
   ],
   [
    "compose logs --since 10m",
    "所有服務最近 10 分鐘"
   ]
  ]
 },
 "容器日誌:docker logs、日誌驅動與輪替#6": {
  "type": "cards",
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "cards": [
   {
    "title": "json-file",
    "points": [
     "預設驅動"
    ]
   },
   {
    "title": "local",
    "points": [
     "Docker 最佳化格式",
     "預設會輪替"
    ]
   },
   {
    "title": "journald",
    "points": [
     "交給 systemd journal"
    ]
   },
   {
    "title": "syslog / fluentd",
    "points": [
     "直接送外部系統"
    ]
   }
  ]
 },
 "除錯實戰:容器啟動失敗與結束碼#1": {
  "type": "flow",
  "layout": "snake",
  "reveal": [
   0,
   1,
   2,
   3,
   4,
   5
  ],
  "nodes": [
   {
    "label": "看狀態",
    "sub": "docker ps -a"
   },
   {
    "label": "看日誌",
    "sub": "docker logs"
   },
   {
    "label": "查設定",
    "sub": "docker inspect"
   },
   {
    "label": "進去確認",
    "sub": "docker exec"
   },
   {
    "label": "修改驗證",
    "sub": "重建或啟動",
    "kind": "end"
   }
  ]
 },
 "除錯實戰:容器啟動失敗與結束碼#2": {
  "type": "table",
  "reveal": [
   0,
   1,
   2,
   3,
   4,
   5
  ],
  "head": [
   "結束碼",
   "意思"
  ],
  "rows": [
   [
    "0",
    "正常結束"
   ],
   [
    "1",
    "應用程式一般錯誤,看日誌"
   ],
   [
    "125",
    "docker run 本身出錯"
   ],
   [
    "126",
    "指令存在但無法執行"
   ],
   [
    "127",
    "找不到指令"
   ]
  ]
 },
 "除錯實戰:容器啟動失敗與結束碼#3": {
  "type": "table",
  "reveal": [
   0,
   1,
   2,
   3
  ],
  "head": [
   "結束碼",
   "算式",
   "意思"
  ],
  "rows": [
   [
    "137",
    "128 + 9",
    "SIGKILL,常見 OOM"
   ],
   [
    "139",
    "128 + 11",
    "Segmentation fault"
   ],
   [
    "143",
    "128 + 15",
    "SIGTERM,正常關閉"
   ]
  ]
 },
 "除錯實戰:容器啟動失敗與結束碼#4": {
  "type": "table",
  "reveal": [
   0,
   0,
   3
  ],
  "head": [
   "欄位",
   "範例結果"
  ],
  "rows": [
   [
    "狀態",
    "exited"
   ],
   [
    "結束碼",
    "137"
   ],
   [
    "OOM",
    "true"
   ]
  ]
 },
 "除錯實戰:容器啟動失敗與結束碼#5": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   1,
   2,
   3,
   4
  ],
  "nodes": [
   {
    "label": "docker ps -a",
    "sub": "看狀態"
   },
   {
    "label": "docker logs",
    "sub": "找不到 flask"
   },
   {
    "label": "缺套件",
    "sub": "查 requirements"
   },
   {
    "label": "重新建置",
    "sub": "驗證修好",
    "kind": "end"
   }
  ]
 },
 "日常維運:磁碟、更新、監控與備份#2": {
  "type": "table",
  "reveal": [
   0,
   0,
   0,
   1,
   2,
   3,
   4
  ],
  "head": [
   "類型",
   "總數",
   "使用中",
   "大小",
   "可回收"
  ],
  "rows": [
   [
    "Images",
    "25",
    "5",
    "8.2GB",
    "6.1GB"
   ],
   [
    "Containers",
    "8",
    "4",
    "120MB",
    "60MB"
   ],
   [
    "Local Volumes",
    "6",
    "3",
    "2.4GB",
    "800MB"
   ],
   [
    "Build Cache",
    "40",
    "0",
    "3.5GB",
    "3.5GB"
   ]
  ]
 },
 "日常維運:磁碟、更新、監控與備份#3": {
  "type": "table",
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "head": [
   "指令",
   "清掉什麼"
  ],
  "rows": [
   [
    "docker system df -v",
    "逐項明細"
   ],
   [
    "container prune",
    "已停止的容器"
   ],
   [
    "image prune",
    "dangling 映像檔"
   ],
   [
    "image prune -a",
    "未被容器使用的映像檔"
   ]
  ]
 },
 "日常維運:磁碟、更新、監控與備份#4": {
  "type": "table",
  "reveal": [
   0,
   1,
   2,
   3
  ],
  "head": [
   "指令",
   "清掉什麼"
  ],
  "rows": [
   [
    "builder prune",
    "建置快取"
   ],
   [
    "volume prune",
    "未使用 volume,資料可能消失"
   ],
   [
    "system prune",
    "停止容器、網路、dangling 映像、快取"
   ]
  ]
 },
 "日常維運:磁碟、更新、監控與備份#6": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   0,
   0,
   0,
   1,
   2,
   3,
   4,
   4
  ],
  "nodes": [
   {
    "label": "compose pull",
    "sub": "拉新映像檔"
   },
   {
    "label": "up -d",
    "sub": "套用更新"
   },
   {
    "label": "image prune -f",
    "sub": "清舊映像檔"
   },
   {
    "label": "改回舊 tag",
    "sub": "up 一次即回滾",
    "kind": "end"
   }
  ]
 },
 "日常維運:磁碟、更新、監控與備份#7": {
  "type": "cards",
  "reveal": [
   0,
   1,
   2,
   3
  ],
  "cards": [
   {
    "title": "輕量工具",
    "points": [
     "docker stats",
     "docker ps 篩不健康",
     "docker events"
    ]
   },
   {
    "title": "長期監控",
    "points": [
     "Prometheus + cAdvisor",
     "Grafana 儀表板"
    ]
   },
   {
    "title": "基本項目",
    "points": [
     "存活與重啟次數",
     "CPU、記憶體、磁碟",
     "錯誤日誌比例",
     "健康檢查端點",
     "映像檔漏洞掃描"
    ]
   }
  ]
 },
 "課程總整理與下一步#2": {
  "type": "table",
  "reveal": [
   0,
   1,
   2,
   3,
   4,
   5
  ],
  "head": [
   "章",
   "主題"
  ],
  "rows": [
   [
    "第四章",
    "儲存:volume、bind mount、tmpfs"
   ],
   [
    "第五章",
    "網路:bridge、-p、自訂網路"
   ],
   [
    "第六章",
    "Compose、健康檢查、secrets"
   ],
   [
    "第七章",
    "最佳化與安全、registry"
   ],
   [
    "第八章",
    "維運:日誌、結束碼、清理"
   ]
  ]
 },
 "課程總整理與下一步#5": {
  "type": "cards",
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "cards": [
   {
    "title": "多台主機",
    "points": [
     "一台放不下",
     "需要容錯"
    ]
   },
   {
    "title": "自我修復",
    "points": [
     "容器掛了自動補上",
     "節點掛了搬工作"
    ]
   },
   {
    "title": "滾動更新",
    "points": [
     "更新不停機",
     "一鍵回滾"
    ]
   },
   {
    "title": "自動擴縮",
    "points": [
     "流量大加副本",
     "流量小再縮減"
    ]
   }
  ]
 },
 "課程總整理與下一步#7": {
  "type": "table",
  "reveal": [
   0,
   2,
   3,
   4,
   5
  ],
  "head": [
   "Docker",
   "Kubernetes"
  ],
  "rows": [
   [
    "容器",
    "Pod 內執行"
   ],
   [
    "compose service",
    "Deployment"
   ],
   [
    "發布埠、名稱互連",
    "Service 和 Ingress"
   ],
   [
    "環境變數 / 機密",
    "ConfigMap / Secret"
   ],
   [
    "volume / 健康檢查",
    "Persistent Volume / Probe"
   ]
  ]
 }
}