[{"data":1,"prerenderedAt":3482},["ShallowReactive",2],{"search-docs":3,"doc-\u002Fgolang\u002Fengineering\u002Fdocker":886},[4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,159,162,165,169,172,175,178,182,186,190,194,198,202,206,210,214,218,222,226,230,234,238,242,246,250,254,258,262,266,269,273,277,281,285,288,291,294,298,301,304,307,310,313,316,319,322,325,329,332,336,340,344,348,352,356,359,362,365,368,371,374,377,380,383,386,389,393,396,399,402,405,408,411,414,417,420,424,428,432,435,438,442,446,450,454,458,462,466,470,474,477,480,483,487,491,494,497,500,504,507,511,515,518,521,524,527,530,533,536,539,542,545,548,551,554,557,560,563,566,569,572,575,579,583,587,591,595,599,603,606,610,614,617,620,623,626,629,633,637,640,643,646,649,652,655,658,661,664,667,670,673,676,679,682,685,688,691,694,697,700,703,706,709,712,716,720,724,728,732,736,740,744,748,752,756,760,764,768,772,775,779,783,787,790,793,796,799,802,805,808,811,814,818,822,825,829,832,835,838,841,844,848,851,854,858,862,865,869,873,876,879,882],{"path":5,"title":6,"description":7},"\u002Fabout\u002Fauthor","作者相关","只想纯粹的做一个程序员...",{"path":9,"title":10,"description":11},"\u002Fabout\u002Fjourney","心路历程","",{"path":13,"title":14,"description":15},"\u002Fai\u002Fagent\u002Fframeworks","Agent 框架","主流 Agent 框架：LangChain、LlamaIndex、AutoGen、CrewAI",{"path":17,"title":18,"description":19},"\u002Fai\u002Fagent\u002Fhooks","Agent Hooks 与自动化","Claude Agent 的 Hooks 生命周期、事件类型、典型自动化场景",{"path":21,"title":22,"description":23},"\u002Fai\u002Fagent\u002Fintroduction","AI Agent 概述","AI Agent 核心概念：感知、规划、执行、记忆",{"path":25,"title":26,"description":27},"\u002Fai\u002Fagent\u002Fpractice","Agent 实战","AI Agent 实战：构建自主任务执行系统",{"path":29,"title":30,"description":31},"\u002Fai\u002Fagent\u002Fsdk","Claude Agent SDK 开发","使用 Claude Agent SDK 构建自定义 AI Agent：架构、API、生命周期",{"path":33,"title":34,"description":35},"\u002Fai\u002Fagent\u002Fsubagents","Subagents 子代理","用 Subagents 分解复杂任务、并发执行、隔离上下文",{"path":37,"title":38,"description":39},"\u002Fai\u002Fagent\u002Ftool-use","工具调用","AI Agent 工具调用：Function Calling、Tool Use 原理与实践",{"path":41,"title":42,"description":43},"\u002Fai\u002Ffundamentals\u002Fdeep-learning","深度学习入门","深度学习基础知识：前向传播、反向传播、损失函数、优化器",{"path":45,"title":46,"description":47},"\u002Fai\u002Ffundamentals\u002Fml-basics","机器学习基础","机器学习核心概念：监督学习、无监督学习、强化学习",{"path":49,"title":50,"description":51},"\u002Fai\u002Ffundamentals\u002Fneural-networks","神经网络原理","神经网络架构：CNN、RNN、注意力机制",{"path":53,"title":54,"description":55},"\u002Fai\u002Fgetting-started","AI 学习路线","AI 技术学习路线图，从基础到实战的完整指南",{"path":57,"title":58,"description":59},"\u002Fai\u002Fllm\u002Ffine-tuning","模型微调","大模型微调技术：LoRA、QLoRA、全量微调、RLHF",{"path":61,"title":62,"description":63},"\u002Fai\u002Fllm\u002Fintroduction","大模型概述","大语言模型发展历程、核心能力与主流模型对比",{"path":65,"title":66,"description":67},"\u002Fai\u002Fllm\u002Flocal-deploy","本地部署","大模型本地部署：Ollama、vLLM、llama.cpp",{"path":69,"title":70,"description":71},"\u002Fai\u002Fllm\u002Ftransformer","Transformer 架构","Transformer 架构详解：自注意力机制、位置编码、多头注意力",{"path":73,"title":74,"description":75},"\u002Fai\u002Fmcp\u002Fclient","MCP Client 开发","MCP Client 开发指南：连接、调用、集成",{"path":77,"title":78,"description":79},"\u002Fai\u002Fmcp\u002Fdebugging","MCP 调试与排错","MCP Server 开发与集成过程中的常见问题、日志分析、诊断工具",{"path":81,"title":82,"description":83},"\u002Fai\u002Fmcp\u002Fintroduction","MCP 概述","Model Context Protocol 协议概述：架构、核心概念、应用场景",{"path":85,"title":86,"description":87},"\u002Fai\u002Fmcp\u002Fserver","MCP Server 开发","MCP Server 开发指南：资源、工具、提示词的实现",{"path":89,"title":90,"description":91},"\u002Fai\u002Fmcp\u002Ftools","MCP Tools 深入","深入理解 MCP Tools：与 Resources\u002FPrompts 的差异、Schema 设计、Annotations 与权限控制",{"path":93,"title":94,"description":95},"\u002Fai\u002Fprompt\u002Fadvanced","高级 Prompt 模式","高级 Prompt 设计模式：Tree-of-Thought、自我反思、多轮对话策略",{"path":97,"title":98,"description":99},"\u002Fai\u002Fprompt\u002Fbasics","Prompt 基础","Prompt Engineering 入门：基本概念、角色设定、输出格式控制",{"path":101,"title":102,"description":103},"\u002Fai\u002Fprompt\u002Ftechniques","提示词技巧","常用提示词技巧：Few-shot、Chain-of-Thought、ReAct",{"path":105,"title":106,"description":107},"\u002Fai\u002Frag\u002Fembedding","文本嵌入","文本嵌入模型：Embedding 原理、模型选择、相似度计算",{"path":109,"title":110,"description":111},"\u002Fai\u002Frag\u002Fintroduction","RAG 概述","检索增强生成（RAG）架构原理、优势与应用场景",{"path":113,"title":114,"description":115},"\u002Fai\u002Frag\u002Fpractice","RAG 实战","RAG 应用实战：文档问答系统、知识库搭建",{"path":117,"title":118,"description":119},"\u002Fai\u002Frag\u002Fvector-database","向量数据库","主流向量数据库对比：Milvus、Pinecone、Chroma、Weaviate",{"path":121,"title":122,"description":123},"\u002Fai\u002Fskills\u002Fbest-practices","Skill 最佳实践","编写高质量 Skill 的设计原则、常见陷阱与优化技巧",{"path":125,"title":126,"description":127},"\u002Fai\u002Fskills\u002Fcreating","创建自定义 Skill","从零编写一个可被 Agent 自动发现和调用的 Skill",{"path":129,"title":130,"description":131},"\u002Fai\u002Fskills\u002Fintroduction","Agent Skills 概述","Claude Agent Skills 概念、工作原理、与 Tools\u002FMCP 的区别",{"path":133,"title":134,"description":135},"\u002Fgolang\u002Fadvanced\u002Fconcurrency","Go - 并发深入","深入理解 Go 并发编程的核心机制。",{"path":137,"title":138,"description":139},"\u002Fgolang\u002Fadvanced\u002Fgc","Go - 垃圾回收","理解 Go 的垃圾回收机制，掌握 GC 调优方法。",{"path":141,"title":142,"description":143},"\u002Fgolang\u002Fadvanced\u002Fgmp","Go - GMP 调度模型","GMP 是 Go 运行时调度器的核心模型，理解它对于编写高性能 Go 程序至关重要。",{"path":145,"title":146,"description":147},"\u002Fgolang\u002Fadvanced\u002Fgo-concurrency","Go - 并发编程","Go 的并发是其核心特性之一，通过 Goroutine 和 Channel 实现。",{"path":149,"title":150,"description":151},"\u002Fgolang\u002Fadvanced\u002Fmemory","Go - 内存模型","理解 Go 的内存分配机制和内存模型。",{"path":153,"title":154,"description":155},"\u002Fgolang\u002Fadvanced\u002Fprofiling","Go - 性能分析","掌握 Go 的性能分析工具：pprof、trace、benchmark。",{"path":157,"title":158,"description":11},"\u002Fgolang\u002Fcore\u002Fgo-basic","Go - 基础语法",{"path":160,"title":161,"description":11},"\u002Fgolang\u002Fcore\u002Fgo-composite","Go - 复合类型",{"path":163,"title":164,"description":11},"\u002Fgolang\u002Fcore\u002Fgo-control","Go - 流程控制",{"path":166,"title":167,"description":168},"\u002Fgolang\u002Fcore\u002Fgo-error","Go - 错误处理","Go 使用显式的错误返回值来处理错误，而不是异常机制。",{"path":170,"title":171,"description":11},"\u002Fgolang\u002Fcore\u002Fgo-function","Go - 函数",{"path":173,"title":174,"description":11},"\u002Fgolang\u002Fcore\u002Fgo-install","Go - 环境搭建",{"path":176,"title":177,"description":11},"\u002Fgolang\u002Fcore\u002Fgo-interface","Go - 接口",{"path":179,"title":180,"description":181},"\u002Fgolang\u002Fcore\u002Fgo-module","Go - 包管理","Go Modules 是 Go 1.11 引入的官方依赖管理方案，Go 1.16 后成为默认模式。",{"path":183,"title":184,"description":185},"\u002Fgolang\u002Fdistributed\u002Fgrpc","Go - gRPC","gRPC 是 Google 开发的高性能 RPC 框架，使用 Protocol Buffers 作为序列化协议。",{"path":187,"title":188,"description":189},"\u002Fgolang\u002Fdistributed\u002Fmicroservice","Go - 微服务","微服务架构的核心组件：服务发现、负载均衡、熔断降级。",{"path":191,"title":192,"description":193},"\u002Fgolang\u002Fdistributed\u002Fmq","Go - 消息队列","使用 Go 操作 Kafka 和 RabbitMQ。",{"path":195,"title":196,"description":197},"\u002Fgolang\u002Fdistributed\u002Fredis","Go - Redis","使用 go-redis 操作 Redis，实现缓存、分布式锁等功能。",{"path":199,"title":200,"description":201},"\u002Fgolang\u002Fengineering\u002Fconfig","Go - 配置管理","使用 viper 进行配置管理，支持多种配置格式和配置中心。",{"path":203,"title":204,"description":205},"\u002Fgolang\u002Fengineering\u002Fdocker","Go - Docker 部署","使用 Docker 容器化部署 Go 应用。",{"path":207,"title":208,"description":209},"\u002Fgolang\u002Fengineering\u002Fkubernetes","Go - Kubernetes 部署","在 Kubernetes 上部署和管理 Go 应用。",{"path":211,"title":212,"description":213},"\u002Fgolang\u002Fengineering\u002Flogging","Go - 日志系统","使用 zap 和 logrus 构建高性能结构化日志系统。",{"path":215,"title":216,"description":217},"\u002Fgolang\u002Fengineering\u002Ftesting","Go - 单元测试","Go 内置了强大的测试框架，掌握测试是编写高质量代码的基础。",{"path":219,"title":220,"description":221},"\u002Fgolang\u002Fstdlib\u002Fbufio","bufio","在 Go 语言中，bufio 包提供了带缓冲的 I\u002FO 操作，能够提高读写性能。以下是一些常用的 bufio 包 API 及其详细说明：",{"path":223,"title":224,"description":225},"\u002Fgolang\u002Fstdlib\u002Fcontainer","container","在Go语言标准库中，container 包提供了几种常用的数据结构实现，这些数据结构对于高效地管理和操作数据非常有用。以下是 container 包中主要的数据结构：",{"path":227,"title":228,"description":229},"\u002Fgolang\u002Fstdlib\u002Fcrypto","crypto","在 Go 语言中，crypto 包提供了一组用于加密和解密的功能。以下是一些常用的 crypto 包及其子包的 API 及其详细说明：",{"path":231,"title":232,"description":233},"\u002Fgolang\u002Fstdlib\u002Fencoding-csv","encoding\u002Fcsv","在 Go 语言中，encoding\u002Fcsv 包提供了对 CSV（逗号分隔值）文件进行读写的功能。以下是一些常用的 encoding\u002Fcsv 包的 API 及其详细说明：",{"path":235,"title":236,"description":237},"\u002Fgolang\u002Fstdlib\u002Fencoding-json","encoding\u002Fjson","在 Go 语言中，encoding\u002Fjson 包提供了对 JSON 数据进行编码和解码的功能。以下是一些常用的 encoding\u002Fjson 包的 API 及其详细说明：",{"path":239,"title":240,"description":241},"\u002Fgolang\u002Fstdlib\u002Fencoding-xml","encoding\u002Fxml","在 Go 语言中，encoding\u002Fxml 包提供了对 XML 数据进行编码和解码的功能。以下是一些常用的 encoding\u002Fxml 包的 API 及其详细说明：",{"path":243,"title":244,"description":245},"\u002Fgolang\u002Fstdlib\u002Fflag","flag","在Go语言中，flag 包是用于处理命令行参数的标准库，它提供了一种简单而直接的方式来解析和使用命令行参数。下面是关于 flag 包的一些基本介绍和常用功能：",{"path":247,"title":248,"description":249},"\u002Fgolang\u002Fstdlib\u002Ffmt","fmt","在 Go 语言的标准库中，fmt 包是非常重要的，它提供了处理格式化输入和输出的基本工具。以下是一些 fmt 包内常用的API：",{"path":251,"title":252,"description":253},"\u002Fgolang\u002Fstdlib\u002Fhttp","net\u002Fhttp","在 Go 语言中，net\u002Fhttp 包提供了用于构建 HTTP 客户端和服务器的强大工具。以下是一些常用的 net\u002Fhttp 包的 API 及其详细说明：",{"path":255,"title":256,"description":257},"\u002Fgolang\u002Fstdlib\u002Fio","io","在 Go 语言中，io 包提供了基本的输入输出功能。以下是一些常用的 io 包的 API 及其详细说明：",{"path":259,"title":260,"description":261},"\u002Fgolang\u002Fstdlib\u002Flog","log","在 Go 语言中，log 包提供了简单的日志记录功能。以下是一些常用的 log 包的 API 及其详细说明：",{"path":263,"title":264,"description":265},"\u002Fgolang\u002Fstdlib\u002Fmath","math","在 Go 语言中，math 包提供了基本的数学函数和常量。以下是一些常用的 math 包的 API 及其详细说明：",{"path":267,"title":268,"description":11},"\u002Fgolang\u002Fstdlib\u002Fnet","net",{"path":270,"title":271,"description":272},"\u002Fgolang\u002Fstdlib\u002Fos","os","在Go语言中，os 包是一个非常重要且常用的标准库，它提供了与操作系统交互的功能，包括文件操作、环境变量管理、进程管理等。下面是一些 os 包中常用的功能和API：",{"path":274,"title":275,"description":276},"\u002Fgolang\u002Fstdlib\u002Fsort","order","在 Go 语言中，sort 包提供了对切片和用户定义的集合进行排序的函数。它实现了常见的排序算法，如快速排序（Quicksort）和堆排序（Heapsort），并且为自定义集合提供了接口，使得用户可以根据特定的需求进行排序。",{"path":278,"title":279,"description":280},"\u002Fgolang\u002Fstdlib\u002Fstrconv","strconv","在 Go 语言中，strconv 包提供了字符串和基本数据类型之间的转换函数，例如将整数转换为字符串、字符串转换为整数，以及其他类型之间的转换。这些功能非常有用，特别是在处理用户输入或从外部数据源读取数据时。",{"path":282,"title":283,"description":284},"\u002Fgolang\u002Fstdlib\u002Ftime","time","在 Go 语言中，time 包提供了处理时间和日期的功能。以下是一些常用的 time 包的 API 及其详细说明：",{"path":286,"title":287,"description":11},"\u002Fgolang\u002Fweb\u002Fgin\u002Ferror","Gin - 错误处理",{"path":289,"title":290,"description":11},"\u002Fgolang\u002Fweb\u002Fgin\u002Ffile","Gin - 文件处理",{"path":292,"title":293,"description":11},"\u002Fgolang\u002Fweb\u002Fgin\u002Fmiddleware","Gin - 中间件",{"path":295,"title":296,"description":297},"\u002Fgolang\u002Fweb\u002Fgin\u002Fquickstart","Gin - 快速开始","Gin 是目前最流行的 Go Web 框架，以高性能和简洁 API 著称。",{"path":299,"title":300,"description":11},"\u002Fgolang\u002Fweb\u002Fgin\u002Frequest","Gin - 请求处理",{"path":302,"title":303,"description":11},"\u002Fgolang\u002Fweb\u002Fgin\u002Fresponse","Gin - 响应处理",{"path":305,"title":306,"description":11},"\u002Fgolang\u002Fweb\u002Fgin\u002Frouter","Gin - 路由",{"path":308,"title":309,"description":11},"\u002Fgolang\u002Fweb\u002Fgin\u002Fvalidation","Gin - 参数校验",{"path":311,"title":312,"description":11},"\u002Fgolang\u002Fweb\u002Fgorm\u002Fassociation","GORM - 关联关系",{"path":314,"title":315,"description":11},"\u002Fgolang\u002Fweb\u002Fgorm\u002Fcrud","GORM - CRUD 操作",{"path":317,"title":318,"description":11},"\u002Fgolang\u002Fweb\u002Fgorm\u002Fmodel","GORM - 模型定义",{"path":320,"title":321,"description":11},"\u002Fgolang\u002Fweb\u002Fgorm\u002Fperformance","GORM - 日志与性能",{"path":323,"title":324,"description":11},"\u002Fgolang\u002Fweb\u002Fgorm\u002Fquery","GORM - 高级查询",{"path":326,"title":327,"description":328},"\u002Fgolang\u002Fweb\u002Fgorm\u002Fquickstart","GORM - 快速开始","GORM 是 Go 语言最流行的 ORM 库，功能强大，使用简单。",{"path":330,"title":331,"description":11},"\u002Fgolang\u002Fweb\u002Fgorm\u002Ftransaction","GORM - 事务与 Hook",{"path":333,"title":334,"description":335},"\u002Finterview\u002Fbasic","计算机基础面经","本章节汇总了面试中常见的通用技术概念，不局限于特定语言或数据库，是考察技术内功的关键考点。",{"path":337,"title":338,"description":339},"\u002Finterview\u002Fgolang","Golang 面试题","Go 语言面试高频考点，覆盖基础语法、数据结构、并发编程、内存管理、GC、调度器等核心知识。",{"path":341,"title":342,"description":343},"\u002Finterview\u002Fk8s","Kubernetes 面试题","Kubernetes（K8s）面试高频考点，覆盖架构原理、核心资源、网络存储、调度策略、运维监控等核心知识。",{"path":345,"title":346,"description":347},"\u002Finterview\u002Fmysql","MySQL 面试题","MySQL 数据库面试高频考点，覆盖索引、事务、锁、优化、主从复制等核心知识。",{"path":349,"title":350,"description":351},"\u002Finterview\u002Fredis","Redis 面试题","Redis 面试高频考点，覆盖数据结构、持久化、集群、缓存一致性、性能优化等核心知识。",{"path":353,"title":354,"description":355},"\u002Finterview\u002Frocketmq","RocketMQ 面试题","RocketMQ 面试高频考点，覆盖消息模型、可靠性、顺序消息、事务消息、存储与高可用等核心知识。",{"path":357,"title":358,"description":11},"\u002Fother\u002Fjava\u002Fcollection\u002Flist-arraylist","List - ArrayList 源码解析",{"path":360,"title":361,"description":11},"\u002Fother\u002Fjava\u002Fcollection\u002Flist-linkedlist","List - LinkedList 源码解析",{"path":363,"title":364,"description":11},"\u002Fother\u002Fjava\u002Fcollection\u002Flist-stack","List - Satck源码解析",{"path":366,"title":367,"description":11},"\u002Fother\u002Fjava\u002Fcollection\u002Flist-vectore","List - Vector 源码解析",{"path":369,"title":370,"description":11},"\u002Fother\u002Fjava\u002Fcollection\u002Fmap-hashmap","Map - HashMap 源码解析",{"path":372,"title":373,"description":11},"\u002Fother\u002Fjava\u002Fcollection\u002Fmap-linkedhashmap","Map - LinkedHashMap 源码解析",{"path":375,"title":376,"description":11},"\u002Fother\u002Fjava\u002Fcollection\u002Fmap-treemap","Map - TreeMap 源码解析",{"path":378,"title":379,"description":11},"\u002Fother\u002Fjava\u002Fcollection\u002Fqueue-deque","Queue - Deque 接口解析",{"path":381,"title":382,"description":11},"\u002Fother\u002Fjava\u002Fcollection\u002Fqueue-queue","Queue - Queue 接口解析",{"path":384,"title":385,"description":11},"\u002Fother\u002Fjava\u002Fcollection\u002Fset-hashset","Set - HashSet源码解析",{"path":387,"title":388,"description":11},"\u002Fother\u002Fjava\u002Fcollection\u002Fset-linkedhashset","Set - LinkedHashSet 源码解析",{"path":390,"title":391,"description":392},"\u002Fother\u002Fjava\u002Fcollection\u002Fset-treeset","Set - TreeSet源码解析","TreeSet 是一个 Set 集合接口的实现类，与 HashSet 类似，其底层也是通过维护了一个 TreeMap 对象来封装了一些实现方法，故本篇不再对 TreeSet 的底层原理进行详细说明，仅对常用 API 做简单介绍，如需了解 TreeMap 的底层实现原理，请移步 Map - HashMap 源码解析",{"path":394,"title":395,"description":11},"\u002Fother\u002Fjava\u002Fcore\u002Fannotation","Java核心 - 注解",{"path":397,"title":398,"description":11},"\u002Fother\u002Fjava\u002Fcore\u002Fbasic-grammar","Java核心 - 基础语法",{"path":400,"title":401,"description":11},"\u002Fother\u002Fjava\u002Fcore\u002Fclass-and-object","Java核心 - 面向对象",{"path":403,"title":404,"description":11},"\u002Fother\u002Fjava\u002Fcore\u002Fcommon-classes","Java核心 - 常用类",{"path":406,"title":407,"description":11},"\u002Fother\u002Fjava\u002Fcore\u002Fexception","Java核心 - 异常处理",{"path":409,"title":410,"description":11},"\u002Fother\u002Fjava\u002Fcore\u002Fgenerics","Java核心 - 泛型",{"path":412,"title":413,"description":11},"\u002Fother\u002Fjava\u002Fcore\u002Fjdk-env-path","Java核心 - 环境搭建",{"path":415,"title":416,"description":11},"\u002Fother\u002Fjava\u002Fcore\u002Freflection","Java核心 - 反射",{"path":418,"title":419,"description":11},"\u002Fother\u002Fjava\u002Fcore\u002Fstring","Java核心 - String 字符串",{"path":421,"title":422,"description":423},"\u002Fother\u002Fjava\u002Fio\u002Fbuffer-stream","Java IO - 缓冲流","缓冲流是对基本流的包装，通过内置缓冲区减少系统调用次数，大幅提升读写效率。",{"path":425,"title":426,"description":427},"\u002Fother\u002Fjava\u002Fio\u002Fbyte-stream","Java IO - 字节流","字节流是 Java IO 中最基本的流类型，以字节（byte）为单位进行数据读写，可以处理任意类型的文件。",{"path":429,"title":430,"description":431},"\u002Fother\u002Fjava\u002Fio\u002Fchar-stream","Java IO - 字符流","字符流以字符为单位进行读写，专门用于处理文本文件。相比字节流，字符流能够正确处理字符编码，避免中文乱码问题。",{"path":433,"title":434,"description":11},"\u002Fother\u002Fjava\u002Fio\u002Ffile","Java IO - File 类",{"path":436,"title":437,"description":11},"\u002Fother\u002Fjava\u002Fio\u002Fio-stream-system","Java IO - IO流概述",{"path":439,"title":440,"description":441},"\u002Fother\u002Fjava\u002Fio\u002Fnio","Java IO - NIO","NIO（New IO）是 JDK 1.4 引入的新 IO 模型，提供了更高效的 IO 操作方式，支持非阻塞 IO 和多路复用。",{"path":443,"title":444,"description":445},"\u002Fother\u002Fjava\u002Fjvm\u002Fclass-loading","类加载机制","类加载机制是 JVM 将 .class 文件加载到内存，并对数据进行校验、转换解析和初始化，最终形成可被 JVM 直接使用的 Java 类型的过程。",{"path":447,"title":448,"description":449},"\u002Fother\u002Fjava\u002Fjvm\u002Fgarbage-collection","垃圾回收","垃圾回收（Garbage Collection，GC）是 JVM 自动管理内存的机制，负责回收不再使用的对象所占用的内存。",{"path":451,"title":452,"description":453},"\u002Fother\u002Fjava\u002Fjvm\u002Fjvm-memory","JVM 内存结构","JVM 在执行 Java 程序时，会把它管理的内存划分为若干个不同的数据区域。这些区域有各自的用途、创建和销毁时间。",{"path":455,"title":456,"description":457},"\u002Fother\u002Fjava\u002Fjvm\u002Fjvm-tuning","JVM 调优","JVM 调优是优化 Java 应用性能的重要手段，主要包括参数配置、性能监控和问题排查。",{"path":459,"title":460,"description":461},"\u002Fother\u002Fjava\u002Fthread\u002Fatomic","原子类","Java 原子类（Atomic Classes）提供了一种无锁的线程安全方式，基于 CAS（Compare-And-Swap）操作实现。",{"path":463,"title":464,"description":465},"\u002Fother\u002Fjava\u002Fthread\u002Fcompletable-future","CompletableFuture","CompletableFuture 是 JDK 8 引入的异步编程工具，实现了 Future 和 CompletionStage 接口，支持函数式编程和链式调用。",{"path":467,"title":468,"description":469},"\u002Fother\u002Fjava\u002Fthread\u002Fconcurrent-collections","并发集合","Java 并发包提供了多种线程安全的集合类，用于替代传统的同步集合（如 Collections.synchronizedList）。",{"path":471,"title":472,"description":473},"\u002Fother\u002Fjava\u002Fthread\u002Fconcurrent-utils","并发工具类","Java 并发包提供了多种实用的并发工具类，用于控制线程之间的协调与同步。",{"path":475,"title":476,"description":11},"\u002Fother\u002Fjava\u002Fthread\u002Fsynchronized-lock","同步机制",{"path":478,"title":479,"description":11},"\u002Fother\u002Fjava\u002Fthread\u002Fthread-basic","线程基础",{"path":481,"title":482,"description":11},"\u002Fother\u002Fjava\u002Fthread\u002Fthread-pool","线程池",{"path":484,"title":485,"description":486},"\u002Fother\u002Fspring-series\u002Fspring\u002Fannotations-beans","Spring - 基于注解管理Bean","从 Java 5 开始，Java 增加了对注解（Annotation）的支持，它是代码中的一种特殊标记，可以在编译、类加载和运行时被读取，执行相应的处理。开发人员可以通过注解在不改变原有代码和逻辑的情况下，在源代码中嵌入补充信息。",{"path":488,"title":489,"description":490},"\u002Fother\u002Fspring-series\u002Fspring\u002Fimplement-ioc","Spring - 原理手写IoC","Spring 框架的 IOC 是基于 Java 反射机制实现的，在学习手写 IoC 之前，你需要具备一定的 Java 反射相关的知识，参考本站内的 Java 教程。",{"path":492,"title":493,"description":11},"\u002Fother\u002Fspring-series\u002Fspring\u002Fintroduction-case","Spring - 入门案例",{"path":495,"title":496,"description":11},"\u002Fother\u002Fspring-series\u002Fspring\u002Fspring-aop","Spring - 面向切面AOP",{"path":498,"title":499,"description":11},"\u002Fother\u002Fspring-series\u002Fspring\u002Fspring-aot","Spring - AOT提前编译",{"path":501,"title":502,"description":503},"\u002Fother\u002Fspring-series\u002Fspring\u002Fspring-data-validation","Spring - 数据校验","在开发中，我们经常遇到参数校验的需求，比如用户注册的时候，要校验用户名不能为空、用户名长度不超过20个字符、手机号是合法的手机号格式等等。如果使用普通方式，我们会把校验的代码和真正的业务处理逻辑耦合在一起，而且如果未来要新增一种校验逻辑也需要在修改多个地方。而spring validation允许通过注解的方式来定义对象校验规则，把校验和业务逻辑分离开，让代码编写更加方便。Spring Validation其实就是对Hibernate Validator进一步的封装，方便在Spring中使用。",{"path":505,"title":506,"description":11},"\u002Fother\u002Fspring-series\u002Fspring\u002Fspring-i18n","Spring - 国际化i18n",{"path":508,"title":509,"description":510},"\u002Fother\u002Fspring-series\u002Fspring\u002Fspring-ioc","Spring - IOC容器","IoC 是 Inversion of Control 的简写，译为“控制反转”，它不是一门技术，而是一种设计思想，是一个重要的面向对象编程法则，能够指导我们如何设计出松耦合、更优良的程序。",{"path":512,"title":513,"description":514},"\u002Fother\u002Fspring-series\u002Fspring\u002Fspring-junit","Spring - 单元测试JUnit","在之前的测试方法中，几乎都能看到以下的两行代码：",{"path":516,"title":517,"description":11},"\u002Fother\u002Fspring-series\u002Fspring\u002Fspring-resources","Spring - 资源操作",{"path":519,"title":520,"description":11},"\u002Fother\u002Fspring-series\u002Fspring\u002Fspring-summarize","Spring - Spring概述",{"path":522,"title":523,"description":11},"\u002Fother\u002Fspring-series\u002Fspring\u002Fspring-transaction","Spring - 事务",{"path":525,"title":526,"description":11},"\u002Fother\u002Fspring-series\u002Fspring\u002Fxml-beans","Spring - 基于XML管理Bean",{"path":528,"title":529,"description":11},"\u002Fother\u002Fspring-series\u002Fspringboot\u002Fspringboot-config","SpringBoot - 配置详解",{"path":531,"title":532,"description":11},"\u002Fother\u002Fspring-series\u002Fspringboot\u002Fspringboot-data","SpringBoot - 数据访问",{"path":534,"title":535,"description":11},"\u002Fother\u002Fspring-series\u002Fspringboot\u002Fspringboot-quickstart","SpringBoot - 快速入门",{"path":537,"title":538,"description":11},"\u002Fother\u002Fspring-series\u002Fspringboot\u002Fspringboot-web","SpringBoot - Web 开发",{"path":540,"title":541,"description":11},"\u002Fother\u002Fspring-series\u002Fspringcloud\u002Fspringcloud-config","SpringCloud - 配置中心",{"path":543,"title":544,"description":11},"\u002Fother\u002Fspring-series\u002Fspringcloud\u002Fspringcloud-discovery","SpringCloud - 服务注册与发现",{"path":546,"title":547,"description":11},"\u002Fother\u002Fspring-series\u002Fspringcloud\u002Fspringcloud-feign","SpringCloud - 服务调用",{"path":549,"title":550,"description":11},"\u002Fother\u002Fspring-series\u002Fspringcloud\u002Fspringcloud-gateway","SpringCloud - 服务网关",{"path":552,"title":553,"description":11},"\u002Fother\u002Fspring-series\u002Fspringcloud\u002Fspringcloud-introduction","SpringCloud - 微服务概述",{"path":555,"title":556,"description":11},"\u002Fother\u002Fspring-series\u002Fspringcloud\u002Fspringcloud-sentinel","SpringCloud - 服务保护",{"path":558,"title":559,"description":11},"\u002Fother\u002Fspring-series\u002Fspringmvc\u002Fspringmvc-databind","SpringMVC - 数据绑定与转换",{"path":561,"title":562,"description":11},"\u002Fother\u002Fspring-series\u002Fspringmvc\u002Fspringmvc-exception","SpringMVC - 异常处理",{"path":564,"title":565,"description":11},"\u002Fother\u002Fspring-series\u002Fspringmvc\u002Fspringmvc-interceptor","SpringMVC - 拦截器",{"path":567,"title":568,"description":11},"\u002Fother\u002Fspring-series\u002Fspringmvc\u002Fspringmvc-introduction","SpringMVC - 简介与环境搭建",{"path":570,"title":571,"description":11},"\u002Fother\u002Fspring-series\u002Fspringmvc\u002Fspringmvc-request","SpringMVC - 请求处理",{"path":573,"title":574,"description":11},"\u002Fother\u002Fspring-series\u002Fspringmvc\u002Fspringmvc-response","SpringMVC - 响应处理",{"path":576,"title":577,"description":578},"\u002Fproject\u002Frocket-leaf\u002Farchitecture","项目架构","Rocket-Leaf 的目录结构、模块划分、数据流向，以及各层之间的依赖关系。",{"path":580,"title":581,"description":582},"\u002Fproject\u002Frocket-leaf\u002Fbackend-layers","后端分层设计","Rocket-Leaf 的 model \u002F rocketmq \u002F service 三层结构，以及服务之间的依赖关系与设计取舍。",{"path":584,"title":585,"description":586},"\u002Fproject\u002Frocket-leaf\u002Fclient-manager","RocketMQ 客户端管理器","AdminClientManager 的多客户端池、默认连接懒加载、自动重连重试的设计与实现。",{"path":588,"title":589,"description":590},"\u002Fproject\u002Frocket-leaf\u002Fencryption","连接信息加密存储","AES-256-GCM + SHA-256 字段级派生密钥的实现，以及如何在不破坏兼容性的前提下为历史明文数据做透明迁移。",{"path":592,"title":593,"description":594},"\u002Fproject\u002Frocket-leaf\u002Ffrontend","前端结构与类型绑定","React + Vite 目录组织、自动生成的 Wails 绑定、api 薄封装与自定义 hooks 的职责划分。",{"path":596,"title":597,"description":598},"\u002Fproject\u002Frocket-leaf","项目简介","Rocket-Leaf 是一款基于 Wails v3 构建的跨平台 RocketMQ 桌面管理客户端，Go 后端 + React 前端。本文档系列拆解它的架构与关键实现。",{"path":600,"title":601,"description":602},"\u002Fproject\u002Frocket-leaf\u002Fwails-v3","Wails v3 入门","Wails v3 的核心概念、Service 绑定机制，以及 Rocket-Leaf 是如何用它把 Go 后端和 React 前端打通的。",{"path":604,"title":605,"description":11},"\u002Ftutorials\u002Fcloud\u002Fdocker\u002Fdocker-basic","Docker - 入门基础",{"path":607,"title":608,"description":609},"\u002Ftutorials\u002Fcloud\u002Fdocker\u002Fdocker-compose","Docker - Compose","在部署应用时，常常使用到不止一个容器，那么在部署容器的时候就需要一个一个进行部署，这样的部署过程也相对来说比较繁琐复杂，也容易出问题，那么有没有一种更为简单的方法呢？",{"path":611,"title":612,"description":613},"\u002Ftutorials\u002Fcloud\u002Fdocker\u002Fdocker-container-connection","Docker - 容器互联","在上一个章节中我们学习了 Docker 容器的端口映射，可以将 Docker 容器和本地以及网络中的端口进行连接起来。",{"path":615,"title":616,"description":11},"\u002Ftutorials\u002Fcloud\u002Fdocker\u002Fdocker-dockerfile","Docker - Dockerfile",{"path":618,"title":619,"description":11},"\u002Ftutorials\u002Fcloud\u002Fdocker\u002Fdocker-helloworld","Docker - HelloWorld",{"path":621,"title":622,"description":11},"\u002Ftutorials\u002Fcloud\u002Fdocker\u002Fdocker-install","Docker - 安装",{"path":624,"title":625,"description":11},"\u002Ftutorials\u002Fcloud\u002Fdocker\u002Fdocker-introduce","Docker - 简介",{"path":627,"title":628,"description":11},"\u002Ftutorials\u002Fcloud\u002Fdocker\u002Fdocker-object","Docker - 镜像、容器、仓库",{"path":630,"title":631,"description":632},"\u002Ftutorials\u002Fcloud\u002Fdocker\u002Fdocker-warehouse","Docker - 仓库管理","仓库是集中存放资源的地方，代码仓库是存放代码的，那么Docker 中的仓库就是存放 Docker 镜像的。",{"path":634,"title":635,"description":636},"\u002Ftutorials\u002Fcloud\u002Fdocker\u002Fdocker-web-containers","Docker - WEB应用实例","在之前的章节中，仅对普通容器进行了演示，但在实际中常常使用到 Docker 容器中的 WEB 应用程序。",{"path":638,"title":639,"description":11},"\u002Ftutorials\u002Fcloud\u002Fkubernetes\u002Fk8s-config","Kubernetes - ConfigMap 与 Secret",{"path":641,"title":642,"description":11},"\u002Ftutorials\u002Fcloud\u002Fkubernetes\u002Fk8s-helm","Kubernetes - Helm 包管理",{"path":644,"title":645,"description":11},"\u002Ftutorials\u002Fcloud\u002Fkubernetes\u002Fk8s-install","Kubernetes - 集群安装",{"path":647,"title":648,"description":11},"\u002Ftutorials\u002Fcloud\u002Fkubernetes\u002Fk8s-introduction","Kubernetes - 简介与架构",{"path":650,"title":651,"description":11},"\u002Ftutorials\u002Fcloud\u002Fkubernetes\u002Fk8s-kubectl","Kubernetes - kubectl 命令行工具",{"path":653,"title":654,"description":11},"\u002Ftutorials\u002Fcloud\u002Fkubernetes\u002Fk8s-monitoring","Kubernetes - 监控与日志",{"path":656,"title":657,"description":11},"\u002Ftutorials\u002Fcloud\u002Fkubernetes\u002Fk8s-network-security","Kubernetes - 网络与安全",{"path":659,"title":660,"description":11},"\u002Ftutorials\u002Fcloud\u002Fkubernetes\u002Fk8s-service","Kubernetes - Service 与 Ingress",{"path":662,"title":663,"description":11},"\u002Ftutorials\u002Fcloud\u002Fkubernetes\u002Fk8s-storage","Kubernetes - 持久化存储",{"path":665,"title":666,"description":11},"\u002Ftutorials\u002Fcloud\u002Fkubernetes\u002Fk8s-workload","Kubernetes - 工作负载资源",{"path":668,"title":669,"description":11},"\u002Ftutorials\u002Fcloud\u002Flinux\u002Flinux-bash","Linux - Bash 基础语法",{"path":671,"title":672,"description":11},"\u002Ftutorials\u002Fcloud\u002Flinux\u002Flinux-file-directory","Linux - 文件与目录操作",{"path":674,"title":675,"description":11},"\u002Ftutorials\u002Fcloud\u002Flinux\u002Flinux-network","Linux - 网络配置",{"path":677,"title":678,"description":11},"\u002Ftutorials\u002Fcloud\u002Flinux\u002Flinux-package","Linux - 软件包管理",{"path":680,"title":681,"description":11},"\u002Ftutorials\u002Fcloud\u002Flinux\u002Flinux-process","Linux - 进程管理",{"path":683,"title":684,"description":11},"\u002Ftutorials\u002Fcloud\u002Flinux\u002Flinux-scripts","Linux - 常用脚本示例",{"path":686,"title":687,"description":11},"\u002Ftutorials\u002Fcloud\u002Flinux\u002Flinux-service","Linux - 服务管理",{"path":689,"title":690,"description":11},"\u002Ftutorials\u002Fcloud\u002Flinux\u002Flinux-user-permission","Linux - 用户与权限管理",{"path":692,"title":693,"description":11},"\u002Ftutorials\u002Fcloud\u002Fnginx\u002Fnginx-https","Nginx - HTTPS 配置",{"path":695,"title":696,"description":11},"\u002Ftutorials\u002Fcloud\u002Fnginx\u002Fnginx-install","Nginx - 安装与配置",{"path":698,"title":699,"description":11},"\u002Ftutorials\u002Fcloud\u002Fnginx\u002Fnginx-loadbalance","Nginx - 负载均衡",{"path":701,"title":702,"description":11},"\u002Ftutorials\u002Fcloud\u002Fnginx\u002Fnginx-optimization","Nginx - 性能优化",{"path":704,"title":705,"description":11},"\u002Ftutorials\u002Fcloud\u002Fnginx\u002Fnginx-proxy","Nginx - 反向代理",{"path":707,"title":708,"description":11},"\u002Ftutorials\u002Fcloud\u002Fnginx\u002Fnginx-static","Nginx - 静态资源服务",{"path":710,"title":711,"description":11},"\u002Ftutorials\u002Fcloud\u002Fnginx\u002Fnginx-vhost","Nginx - 虚拟主机配置",{"path":713,"title":714,"description":715},"\u002Ftutorials\u002Fdatabase\u002Fmysql\u002Fmysql-architecture","MySQL 高可用架构","主从复制、读写分离、分库分表。",{"path":717,"title":718,"description":719},"\u002Ftutorials\u002Fdatabase\u002Fmysql\u002Fmysql-index","MySQL 索引","索引是帮助 MySQL 高效获取数据的有序数据结构。",{"path":721,"title":722,"description":723},"\u002Ftutorials\u002Fdatabase\u002Fmysql\u002Fmysql-lock","MySQL 锁","锁用于解决并发访问时的数据一致性问题。",{"path":725,"title":726,"description":727},"\u002Ftutorials\u002Fdatabase\u002Fmysql\u002Fmysql-optimize","MySQL 性能优化","SQL 优化是后端开发必备技能。",{"path":729,"title":730,"description":731},"\u002Ftutorials\u002Fdatabase\u002Fmysql\u002Fmysql-transaction","MySQL 事务","事务是一组不可分割的操作，要么全部成功，要么全部失败。",{"path":733,"title":734,"description":735},"\u002Ftutorials\u002Fdatabase\u002Fmysql\u002Fsql-advanced","SQL 进阶","多表查询、子查询、函数、视图、存储过程。",{"path":737,"title":738,"description":739},"\u002Ftutorials\u002Fdatabase\u002Fmysql\u002Fsql-basic","SQL 基础","SQL（Structured Query Language）是操作关系型数据库的标准语言。",{"path":741,"title":742,"description":743},"\u002Ftutorials\u002Fdatabase\u002Fredis\u002Fredis-advanced","Redis 进阶功能","事务、发布订阅、Lua 脚本、Pipeline。",{"path":745,"title":746,"description":747},"\u002Ftutorials\u002Fdatabase\u002Fredis\u002Fredis-basic","Redis 基础","Redis 安装配置与基本命令。",{"path":749,"title":750,"description":751},"\u002Ftutorials\u002Fdatabase\u002Fredis\u002Fredis-cluster","Redis 高可用","主从复制、哨兵、Cluster 集群。",{"path":753,"title":754,"description":755},"\u002Ftutorials\u002Fdatabase\u002Fredis\u002Fredis-datatype","Redis 数据类型","Redis 5 种基本数据类型 + 4 种特殊类型。",{"path":757,"title":758,"description":759},"\u002Ftutorials\u002Fdatabase\u002Fredis\u002Fredis-optimize","Redis 性能优化","内存优化、缓存问题、最佳实践。",{"path":761,"title":762,"description":763},"\u002Ftutorials\u002Fdatabase\u002Fredis\u002Fredis-persistence","Redis 持久化","Redis 提供 RDB 和 AOF 两种持久化方式。",{"path":765,"title":766,"description":767},"\u002Ftutorials\u002Fdatabase\u002Fredis\u002Fredis-principle","Redis 底层原理","数据结构、线程模型、网络模型。",{"path":769,"title":770,"description":771},"\u002Ftutorials\u002Fdev-idea\u002Fdesign-patterns\u002Fbehaiver-patterns\u002Fobserver-pattern","观察者模式","观察者模式属于行为型模式，定义了对象之间的一对多的依赖关系，在这种模式中，当一个对象的状态发生变化时，所有依赖于它的对象都会得到通知，并且执行相关操作。观察者模式又被成为“发布—订阅模式”，即发布者发生改变后，会通知所有订阅者。",{"path":773,"title":774,"description":11},"\u002Ftutorials\u002Fdev-idea\u002Fdesign-patterns\u002Fcreate-patterns\u002Ffactory-pattern","工厂模式",{"path":776,"title":777,"description":778},"\u002Ftutorials\u002Fdev-idea\u002Fdesign-patterns\u002Fcreate-patterns\u002Fsingleton-pattern","单例模式","单例模式是最常用的设计模式之一，他可以保证在整个应用中，某个类只存在一个实例化对象，即全局使用到该类的只有一个对象，这种模式在需要限制某些类的实例数量时非常有用，通常全局只需要一个该对象即可，如一些配置文件映射对象、数据库连接对象等。",{"path":780,"title":781,"description":782},"\u002Ftutorials\u002Fdev-idea\u002Fdesign-patterns\u002Fstructural-patterns\u002Fadapter-pattern","适配器模式","适配器模式是一种结构型模式，可以将一个类的接口转换成客户端所期望的另一种接口，适配器模式可以帮助开发人员在不修改现有代码的情况下，将不兼容的类组合在一起。",{"path":784,"title":785,"description":786},"\u002Ftutorials\u002Fdev-tools\u002Fgit\u002Fgit-basic-operations","Git 创建版本库","在 Git 上创建版本库有两种方式，一种是直接拷贝远程 Git 仓库到本地，另外一种是我们自己创建本地的版本库。",{"path":788,"title":789,"description":11},"\u002Ftutorials\u002Fdev-tools\u002Fgit\u002Fgit-branch-manage","Git 分支管理",{"path":791,"title":792,"description":11},"\u002Ftutorials\u002Fdev-tools\u002Fgit\u002Fgit-content-operations","Git 仓库内容操作",{"path":794,"title":795,"description":11},"\u002Ftutorials\u002Fdev-tools\u002Fgit\u002Fgit-introduce-install","Git 介绍和安装",{"path":797,"title":798,"description":11},"\u002Ftutorials\u002Fdev-tools\u002Fgit\u002Fgit-remote-manage","Git 远程管理",{"path":800,"title":801,"description":11},"\u002Ftutorials\u002Fdev-tools\u002Fgit\u002Fgit-workspace-index-repo","Git 工作原理",{"path":803,"title":804,"description":11},"\u002Ftutorials\u002Fdev-tools\u002Fhomebrew","HomeBrew 教程",{"path":806,"title":807,"description":11},"\u002Ftutorials\u002Fdev-tools\u002Fidea\u002Fshortcuts","快捷键",{"path":809,"title":810,"description":11},"\u002Ftutorials\u002Fdev-tools\u002Fmaven\u002Fintroduce-install-config","Maven - 介绍、安装、配置",{"path":812,"title":813,"description":11},"\u002Ftutorials\u002Ffront-end\u002Fvue3\u002Fbasic-knowledge","2. 基础知识",{"path":815,"title":816,"description":817},"\u002Ftutorials\u002Ffront-end\u002Fvue3\u002Fcomponent-communication","9. 组件通信","在前面的章节内，介绍了 Vue 中最核心的内容——组件的介绍和使用，和 Java 等编程语言相反，组件并不近似于这些变成语言中的类，类可以通过类或者其实例化的对象来相互交互，但 Vue 组件之间的作用域是相互独立的，这就意味着不同组件之间的数据无法相互引用。",{"path":819,"title":820,"description":821},"\u002Ftutorials\u002Ffront-end\u002Fvue3\u002Fcomputed","4. 计算属性","虽然直接在模板中使用表达式方便，但是如果在模板中添加很多逻辑，会让模板变的臃肿且难维护，耦合度较高。有没有一种简单的方式来实现呢？答案是有的。",{"path":823,"title":824,"description":11},"\u002Ftutorials\u002Ffront-end\u002Fvue3\u002Fcreate-vue-project","1. 环境搭建及安装",{"path":826,"title":827,"description":828},"\u002Ftutorials\u002Ffront-end\u002Fvue3\u002Flife-cycle","6. 生命周期","生命周期是指组件从创建、挂载、更新到销毁的整个过程中所经历的一系列阶段。在 Vue 中，每个组件都有自己的生命周期，可以通过生命周期钩子函数来监听和处理组件在不同阶段的行为和状态。",{"path":830,"title":831,"description":11},"\u002Ftutorials\u002Ffront-end\u002Fvue3\u002Fother-api","10. 其他 API",{"path":833,"title":834,"description":11},"\u002Ftutorials\u002Ffront-end\u002Fvue3\u002Fpinia","8. Pinia",{"path":836,"title":837,"description":11},"\u002Ftutorials\u002Ffront-end\u002Fvue3\u002Frouter","7. 路由",{"path":839,"title":840,"description":11},"\u002Ftutorials\u002Ffront-end\u002Fvue3\u002Ftemplate-grammar","3. 指令及模板语法",{"path":842,"title":843,"description":11},"\u002Ftutorials\u002Ffront-end\u002Fvue3\u002Fvue3-new-component","11. Vue3 新组件",{"path":845,"title":846,"description":847},"\u002Ftutorials\u002Ffront-end\u002Fvue3\u002Fwatch","5. 监视","Watch 是 Vue 提供的一个用于监视响应式数据变化并执行相应操作的 API，能够对响应式数据的变化做出一些操作的功能。Vue3 中的 Watch 支持多种用法，包括监视响应式对象、ref 对象、数组、函数等。",{"path":849,"title":850,"description":11},"\u002Ftutorials\u002Fmq\u002Fkafka\u002Fkafka-introduction","Kafka 简介与安装",{"path":852,"title":853,"description":11},"\u002Ftutorials\u002Fmq\u002Fkafka\u002Fkafka-producer-consumer","Kafka 生产者与消费者",{"path":855,"title":856,"description":857},"\u002Ftutorials\u002Fmq\u002Fkafka\u002Fkafka-springboot","Spring Boot 整合 Kafka","Spring Kafka 提供了对 Apache Kafka 的便捷集成。",{"path":859,"title":860,"description":861},"\u002Ftutorials\u002Fmq\u002Frabbitmq\u002Frabbitmq-exchange","RabbitMQ Exchange 详解","Exchange（交换机）是 RabbitMQ 的核心组件，负责接收生产者发送的消息，并根据规则将消息路由到一个或多个队列。",{"path":863,"title":864,"description":11},"\u002Ftutorials\u002Fmq\u002Frabbitmq\u002Frabbitmq-introduction","RabbitMQ 简介与安装",{"path":866,"title":867,"description":868},"\u002Ftutorials\u002Fmq\u002Frabbitmq\u002Frabbitmq-reliability","RabbitMQ 消息可靠性","消息可靠性是消息队列的核心要求，RabbitMQ 提供了多种机制来保证消息不丢失。",{"path":870,"title":871,"description":872},"\u002Ftutorials\u002Fmq\u002Frabbitmq\u002Frabbitmq-springboot","Spring Boot 整合 RabbitMQ","Spring AMQP 提供了对 RabbitMQ 的便捷集成，大大简化了开发工作。",{"path":874,"title":875,"description":11},"\u002Ftutorials\u002Fmq\u002Frocketmq\u002Frocketmq-client","RocketMQ 客户端使用",{"path":877,"title":878,"description":11},"\u002Ftutorials\u002Fmq\u002Frocketmq\u002Frocketmq-concepts","RocketMQ 核心概念",{"path":880,"title":881,"description":11},"\u002Ftutorials\u002Fmq\u002Frocketmq\u002Frocketmq-installation","RocketMQ 安装部署",{"path":883,"title":884,"description":885},"\u002Ftutorials\u002Fmq\u002Frocketmq\u002Frocketmq-message-type","RocketMQ 消息类型","RocketMQ 支持多种消息类型，满足不同业务场景需求。",{"id":887,"title":204,"body":888,"description":205,"extension":3477,"meta":3478,"navigation":930,"path":203,"seo":3479,"stem":3480,"__hash__":3481},"docs\u002Fgolang\u002Fengineering\u002Fdocker.md",{"type":889,"value":890,"toc":3453},"minimark",[891,894,899,904,1025,1029,1240,1243,1391,1394,1560,1713,1803,1807,1810,2098,2101,2302,2375,2378,2620,2623,2627,2673,2677,2685,2689,2757,2761,2849,2853,2874,2990,2993,3166,3170,3174,3449],[892,893,205],"p",{},[895,896,898],"h2",{"id":897},"dockerfile","Dockerfile",[900,901,903],"h3",{"id":902},"基础-dockerfile","基础 Dockerfile",[905,906,909],"pre",{"className":907,"code":908,"language":897,"meta":11,"style":11},"language-dockerfile shiki shiki-themes github-light github-light github-dark","FROM golang:1.21\n\nWORKDIR \u002Fapp\n\nCOPY go.mod go.sum .\u002F\nRUN go mod download\n\nCOPY . .\n\nRUN go build -o main .\n\nEXPOSE 8080\n\nCMD [\".\u002Fmain\"]\n",[910,911,912,925,932,941,946,955,964,969,977,982,990,995,1004,1009],"code",{"__ignoreMap":11},[913,914,917,921],"span",{"class":915,"line":916},"line",1,[913,918,920],{"class":919},"s8jYJ","FROM",[913,922,924],{"class":923},"sxrX7"," golang:1.21\n",[913,926,928],{"class":915,"line":927},2,[913,929,931],{"emptyLinePlaceholder":930},true,"\n",[913,933,935,938],{"class":915,"line":934},3,[913,936,937],{"class":919},"WORKDIR",[913,939,940],{"class":923}," \u002Fapp\n",[913,942,944],{"class":915,"line":943},4,[913,945,931],{"emptyLinePlaceholder":930},[913,947,949,952],{"class":915,"line":948},5,[913,950,951],{"class":919},"COPY",[913,953,954],{"class":923}," go.mod go.sum .\u002F\n",[913,956,958,961],{"class":915,"line":957},6,[913,959,960],{"class":919},"RUN",[913,962,963],{"class":923}," go mod download\n",[913,965,967],{"class":915,"line":966},7,[913,968,931],{"emptyLinePlaceholder":930},[913,970,972,974],{"class":915,"line":971},8,[913,973,951],{"class":919},[913,975,976],{"class":923}," . .\n",[913,978,980],{"class":915,"line":979},9,[913,981,931],{"emptyLinePlaceholder":930},[913,983,985,987],{"class":915,"line":984},10,[913,986,960],{"class":919},[913,988,989],{"class":923}," go build -o main .\n",[913,991,993],{"class":915,"line":992},11,[913,994,931],{"emptyLinePlaceholder":930},[913,996,998,1001],{"class":915,"line":997},12,[913,999,1000],{"class":919},"EXPOSE",[913,1002,1003],{"class":923}," 8080\n",[913,1005,1007],{"class":915,"line":1006},13,[913,1008,931],{"emptyLinePlaceholder":930},[913,1010,1012,1015,1018,1022],{"class":915,"line":1011},14,[913,1013,1014],{"class":919},"CMD",[913,1016,1017],{"class":923}," [",[913,1019,1021],{"class":1020},"sIIMD","\".\u002Fmain\"",[913,1023,1024],{"class":923},"]\n",[900,1026,1028],{"id":1027},"多阶段构建推荐","多阶段构建（推荐）",[905,1030,1032],{"className":907,"code":1031,"language":897,"meta":11,"style":11},"# 构建阶段\nFROM golang:1.21-alpine AS builder\n\nWORKDIR \u002Fapp\n\n# 安装依赖\nCOPY go.mod go.sum .\u002F\nRUN go mod download\n\n# 复制源码\nCOPY . .\n\n# 编译\nRUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main .\n\n# 运行阶段\nFROM alpine:latest\n\n# 安装证书（HTTPS 请求需要）\nRUN apk --no-cache add ca-certificates tzdata\n\nWORKDIR \u002Fapp\n\n# 从构建阶段复制二进制文件\nCOPY --from=builder \u002Fapp\u002Fmain .\nCOPY --from=builder \u002Fapp\u002Fconfigs .\u002Fconfigs\n\n# 设置时区\nENV TZ=Asia\u002FShanghai\n\nEXPOSE 8080\n\nCMD [\".\u002Fmain\"]\n",[910,1033,1034,1040,1053,1057,1063,1067,1072,1078,1084,1088,1093,1099,1103,1108,1115,1120,1126,1134,1139,1145,1153,1158,1165,1170,1176,1184,1192,1197,1203,1212,1217,1224,1229],{"__ignoreMap":11},[913,1035,1036],{"class":915,"line":916},[913,1037,1039],{"class":1038},"sCsY4","# 构建阶段\n",[913,1041,1042,1044,1047,1050],{"class":915,"line":927},[913,1043,920],{"class":919},[913,1045,1046],{"class":923}," golang:1.21-alpine ",[913,1048,1049],{"class":919},"AS",[913,1051,1052],{"class":923}," builder\n",[913,1054,1055],{"class":915,"line":934},[913,1056,931],{"emptyLinePlaceholder":930},[913,1058,1059,1061],{"class":915,"line":943},[913,1060,937],{"class":919},[913,1062,940],{"class":923},[913,1064,1065],{"class":915,"line":948},[913,1066,931],{"emptyLinePlaceholder":930},[913,1068,1069],{"class":915,"line":957},[913,1070,1071],{"class":1038},"# 安装依赖\n",[913,1073,1074,1076],{"class":915,"line":966},[913,1075,951],{"class":919},[913,1077,954],{"class":923},[913,1079,1080,1082],{"class":915,"line":971},[913,1081,960],{"class":919},[913,1083,963],{"class":923},[913,1085,1086],{"class":915,"line":979},[913,1087,931],{"emptyLinePlaceholder":930},[913,1089,1090],{"class":915,"line":984},[913,1091,1092],{"class":1038},"# 复制源码\n",[913,1094,1095,1097],{"class":915,"line":992},[913,1096,951],{"class":919},[913,1098,976],{"class":923},[913,1100,1101],{"class":915,"line":997},[913,1102,931],{"emptyLinePlaceholder":930},[913,1104,1105],{"class":915,"line":1006},[913,1106,1107],{"class":1038},"# 编译\n",[913,1109,1110,1112],{"class":915,"line":1011},[913,1111,960],{"class":919},[913,1113,1114],{"class":923}," CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main .\n",[913,1116,1118],{"class":915,"line":1117},15,[913,1119,931],{"emptyLinePlaceholder":930},[913,1121,1123],{"class":915,"line":1122},16,[913,1124,1125],{"class":1038},"# 运行阶段\n",[913,1127,1129,1131],{"class":915,"line":1128},17,[913,1130,920],{"class":919},[913,1132,1133],{"class":923}," alpine:latest\n",[913,1135,1137],{"class":915,"line":1136},18,[913,1138,931],{"emptyLinePlaceholder":930},[913,1140,1142],{"class":915,"line":1141},19,[913,1143,1144],{"class":1038},"# 安装证书（HTTPS 请求需要）\n",[913,1146,1148,1150],{"class":915,"line":1147},20,[913,1149,960],{"class":919},[913,1151,1152],{"class":923}," apk --no-cache add ca-certificates tzdata\n",[913,1154,1156],{"class":915,"line":1155},21,[913,1157,931],{"emptyLinePlaceholder":930},[913,1159,1161,1163],{"class":915,"line":1160},22,[913,1162,937],{"class":919},[913,1164,940],{"class":923},[913,1166,1168],{"class":915,"line":1167},23,[913,1169,931],{"emptyLinePlaceholder":930},[913,1171,1173],{"class":915,"line":1172},24,[913,1174,1175],{"class":1038},"# 从构建阶段复制二进制文件\n",[913,1177,1179,1181],{"class":915,"line":1178},25,[913,1180,951],{"class":919},[913,1182,1183],{"class":923}," --from=builder \u002Fapp\u002Fmain .\n",[913,1185,1187,1189],{"class":915,"line":1186},26,[913,1188,951],{"class":919},[913,1190,1191],{"class":923}," --from=builder \u002Fapp\u002Fconfigs .\u002Fconfigs\n",[913,1193,1195],{"class":915,"line":1194},27,[913,1196,931],{"emptyLinePlaceholder":930},[913,1198,1200],{"class":915,"line":1199},28,[913,1201,1202],{"class":1038},"# 设置时区\n",[913,1204,1206,1209],{"class":915,"line":1205},29,[913,1207,1208],{"class":919},"ENV",[913,1210,1211],{"class":923}," TZ=Asia\u002FShanghai\n",[913,1213,1215],{"class":915,"line":1214},30,[913,1216,931],{"emptyLinePlaceholder":930},[913,1218,1220,1222],{"class":915,"line":1219},31,[913,1221,1000],{"class":919},[913,1223,1003],{"class":923},[913,1225,1227],{"class":915,"line":1226},32,[913,1228,931],{"emptyLinePlaceholder":930},[913,1230,1232,1234,1236,1238],{"class":915,"line":1231},33,[913,1233,1014],{"class":919},[913,1235,1017],{"class":923},[913,1237,1021],{"class":1020},[913,1239,1024],{"class":923},[900,1241,1242],{"id":1242},"更小的镜像",[905,1244,1246],{"className":907,"code":1245,"language":897,"meta":11,"style":11},"# 使用 scratch（最小镜像）\nFROM golang:1.21-alpine AS builder\n\nWORKDIR \u002Fapp\n\nCOPY go.mod go.sum .\u002F\nRUN go mod download\n\nCOPY . .\n\n# 静态编译\nRUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \\\n    -ldflags=\"-w -s\" \\\n    -o main .\n\n# 使用 scratch 基础镜像\nFROM scratch\n\nCOPY --from=builder \u002Fapp\u002Fmain \u002Fmain\nCOPY --from=builder \u002Fetc\u002Fssl\u002Fcerts\u002Fca-certificates.crt \u002Fetc\u002Fssl\u002Fcerts\u002F\n\nEXPOSE 8080\n\nENTRYPOINT [\"\u002Fmain\"]\n",[910,1247,1248,1253,1263,1267,1273,1277,1283,1289,1293,1299,1303,1308,1315,1326,1331,1335,1340,1347,1351,1358,1365,1369,1375,1379],{"__ignoreMap":11},[913,1249,1250],{"class":915,"line":916},[913,1251,1252],{"class":1038},"# 使用 scratch（最小镜像）\n",[913,1254,1255,1257,1259,1261],{"class":915,"line":927},[913,1256,920],{"class":919},[913,1258,1046],{"class":923},[913,1260,1049],{"class":919},[913,1262,1052],{"class":923},[913,1264,1265],{"class":915,"line":934},[913,1266,931],{"emptyLinePlaceholder":930},[913,1268,1269,1271],{"class":915,"line":943},[913,1270,937],{"class":919},[913,1272,940],{"class":923},[913,1274,1275],{"class":915,"line":948},[913,1276,931],{"emptyLinePlaceholder":930},[913,1278,1279,1281],{"class":915,"line":957},[913,1280,951],{"class":919},[913,1282,954],{"class":923},[913,1284,1285,1287],{"class":915,"line":966},[913,1286,960],{"class":919},[913,1288,963],{"class":923},[913,1290,1291],{"class":915,"line":971},[913,1292,931],{"emptyLinePlaceholder":930},[913,1294,1295,1297],{"class":915,"line":979},[913,1296,951],{"class":919},[913,1298,976],{"class":923},[913,1300,1301],{"class":915,"line":984},[913,1302,931],{"emptyLinePlaceholder":930},[913,1304,1305],{"class":915,"line":992},[913,1306,1307],{"class":1038},"# 静态编译\n",[913,1309,1310,1312],{"class":915,"line":997},[913,1311,960],{"class":919},[913,1313,1314],{"class":923}," CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \\\n",[913,1316,1317,1320,1323],{"class":915,"line":1006},[913,1318,1319],{"class":923},"    -ldflags=",[913,1321,1322],{"class":1020},"\"-w -s\"",[913,1324,1325],{"class":923}," \\\n",[913,1327,1328],{"class":915,"line":1011},[913,1329,1330],{"class":923},"    -o main .\n",[913,1332,1333],{"class":915,"line":1117},[913,1334,931],{"emptyLinePlaceholder":930},[913,1336,1337],{"class":915,"line":1122},[913,1338,1339],{"class":1038},"# 使用 scratch 基础镜像\n",[913,1341,1342,1344],{"class":915,"line":1128},[913,1343,920],{"class":919},[913,1345,1346],{"class":923}," scratch\n",[913,1348,1349],{"class":915,"line":1136},[913,1350,931],{"emptyLinePlaceholder":930},[913,1352,1353,1355],{"class":915,"line":1141},[913,1354,951],{"class":919},[913,1356,1357],{"class":923}," --from=builder \u002Fapp\u002Fmain \u002Fmain\n",[913,1359,1360,1362],{"class":915,"line":1147},[913,1361,951],{"class":919},[913,1363,1364],{"class":923}," --from=builder \u002Fetc\u002Fssl\u002Fcerts\u002Fca-certificates.crt \u002Fetc\u002Fssl\u002Fcerts\u002F\n",[913,1366,1367],{"class":915,"line":1155},[913,1368,931],{"emptyLinePlaceholder":930},[913,1370,1371,1373],{"class":915,"line":1160},[913,1372,1000],{"class":919},[913,1374,1003],{"class":923},[913,1376,1377],{"class":915,"line":1167},[913,1378,931],{"emptyLinePlaceholder":930},[913,1380,1381,1384,1386,1389],{"class":915,"line":1172},[913,1382,1383],{"class":919},"ENTRYPOINT",[913,1385,1017],{"class":923},[913,1387,1388],{"class":1020},"\"\u002Fmain\"",[913,1390,1024],{"class":923},[900,1392,1393],{"id":1393},"带版本信息",[905,1395,1397],{"className":907,"code":1396,"language":897,"meta":11,"style":11},"FROM golang:1.21-alpine AS builder\n\nARG VERSION=dev\nARG BUILD_TIME\nARG GIT_COMMIT\n\nWORKDIR \u002Fapp\n\nCOPY go.mod go.sum .\u002F\nRUN go mod download\n\nCOPY . .\n\nRUN CGO_ENABLED=0 go build \\\n    -ldflags=\"-X main.Version=${VERSION} -X main.BuildTime=${BUILD_TIME} -X main.GitCommit=${GIT_COMMIT}\" \\\n    -o main .\n\nFROM alpine:latest\n\nRUN apk --no-cache add ca-certificates\n\nWORKDIR \u002Fapp\n\nCOPY --from=builder \u002Fapp\u002Fmain .\n\nEXPOSE 8080\n\nCMD [\".\u002Fmain\"]\n",[910,1398,1399,1409,1413,1421,1428,1435,1439,1445,1449,1455,1461,1465,1471,1475,1482,1491,1495,1499,1505,1509,1516,1520,1526,1530,1536,1540,1546,1550],{"__ignoreMap":11},[913,1400,1401,1403,1405,1407],{"class":915,"line":916},[913,1402,920],{"class":919},[913,1404,1046],{"class":923},[913,1406,1049],{"class":919},[913,1408,1052],{"class":923},[913,1410,1411],{"class":915,"line":927},[913,1412,931],{"emptyLinePlaceholder":930},[913,1414,1415,1418],{"class":915,"line":934},[913,1416,1417],{"class":919},"ARG",[913,1419,1420],{"class":923}," VERSION=dev\n",[913,1422,1423,1425],{"class":915,"line":943},[913,1424,1417],{"class":919},[913,1426,1427],{"class":923}," BUILD_TIME\n",[913,1429,1430,1432],{"class":915,"line":948},[913,1431,1417],{"class":919},[913,1433,1434],{"class":923}," GIT_COMMIT\n",[913,1436,1437],{"class":915,"line":957},[913,1438,931],{"emptyLinePlaceholder":930},[913,1440,1441,1443],{"class":915,"line":966},[913,1442,937],{"class":919},[913,1444,940],{"class":923},[913,1446,1447],{"class":915,"line":971},[913,1448,931],{"emptyLinePlaceholder":930},[913,1450,1451,1453],{"class":915,"line":979},[913,1452,951],{"class":919},[913,1454,954],{"class":923},[913,1456,1457,1459],{"class":915,"line":984},[913,1458,960],{"class":919},[913,1460,963],{"class":923},[913,1462,1463],{"class":915,"line":992},[913,1464,931],{"emptyLinePlaceholder":930},[913,1466,1467,1469],{"class":915,"line":997},[913,1468,951],{"class":919},[913,1470,976],{"class":923},[913,1472,1473],{"class":915,"line":1006},[913,1474,931],{"emptyLinePlaceholder":930},[913,1476,1477,1479],{"class":915,"line":1011},[913,1478,960],{"class":919},[913,1480,1481],{"class":923}," CGO_ENABLED=0 go build \\\n",[913,1483,1484,1486,1489],{"class":915,"line":1117},[913,1485,1319],{"class":923},[913,1487,1488],{"class":1020},"\"-X main.Version=${VERSION} -X main.BuildTime=${BUILD_TIME} -X main.GitCommit=${GIT_COMMIT}\"",[913,1490,1325],{"class":923},[913,1492,1493],{"class":915,"line":1122},[913,1494,1330],{"class":923},[913,1496,1497],{"class":915,"line":1128},[913,1498,931],{"emptyLinePlaceholder":930},[913,1500,1501,1503],{"class":915,"line":1136},[913,1502,920],{"class":919},[913,1504,1133],{"class":923},[913,1506,1507],{"class":915,"line":1141},[913,1508,931],{"emptyLinePlaceholder":930},[913,1510,1511,1513],{"class":915,"line":1147},[913,1512,960],{"class":919},[913,1514,1515],{"class":923}," apk --no-cache add ca-certificates\n",[913,1517,1518],{"class":915,"line":1155},[913,1519,931],{"emptyLinePlaceholder":930},[913,1521,1522,1524],{"class":915,"line":1160},[913,1523,937],{"class":919},[913,1525,940],{"class":923},[913,1527,1528],{"class":915,"line":1167},[913,1529,931],{"emptyLinePlaceholder":930},[913,1531,1532,1534],{"class":915,"line":1172},[913,1533,951],{"class":919},[913,1535,1183],{"class":923},[913,1537,1538],{"class":915,"line":1178},[913,1539,931],{"emptyLinePlaceholder":930},[913,1541,1542,1544],{"class":915,"line":1186},[913,1543,1000],{"class":919},[913,1545,1003],{"class":923},[913,1547,1548],{"class":915,"line":1194},[913,1549,931],{"emptyLinePlaceholder":930},[913,1551,1552,1554,1556,1558],{"class":915,"line":1199},[913,1553,1014],{"class":919},[913,1555,1017],{"class":923},[913,1557,1021],{"class":1020},[913,1559,1024],{"class":923},[905,1561,1565],{"className":1562,"code":1563,"language":1564,"meta":11,"style":11},"language-go shiki shiki-themes github-light github-light github-dark","\u002F\u002F main.go\npackage main\n\nvar (\n    Version   = \"dev\"\n    BuildTime = \"unknown\"\n    GitCommit = \"unknown\"\n)\n\nfunc main() {\n    fmt.Printf(\"Version: %s\\n\", Version)\n    fmt.Printf(\"Build Time: %s\\n\", BuildTime)\n    fmt.Printf(\"Git Commit: %s\\n\", GitCommit)\n    \u002F\u002F ...\n}\n","go",[910,1566,1567,1572,1581,1585,1593,1604,1614,1623,1628,1632,1643,1667,1685,1703,1708],{"__ignoreMap":11},[913,1568,1569],{"class":915,"line":916},[913,1570,1571],{"class":1038},"\u002F\u002F main.go\n",[913,1573,1574,1577],{"class":915,"line":927},[913,1575,1576],{"class":919},"package",[913,1578,1580],{"class":1579},"snPdu"," main\n",[913,1582,1583],{"class":915,"line":934},[913,1584,931],{"emptyLinePlaceholder":930},[913,1586,1587,1590],{"class":915,"line":943},[913,1588,1589],{"class":919},"var",[913,1591,1592],{"class":923}," (\n",[913,1594,1595,1598,1601],{"class":915,"line":948},[913,1596,1597],{"class":923},"    Version   ",[913,1599,1600],{"class":919},"=",[913,1602,1603],{"class":1020}," \"dev\"\n",[913,1605,1606,1609,1611],{"class":915,"line":957},[913,1607,1608],{"class":923},"    BuildTime ",[913,1610,1600],{"class":919},[913,1612,1613],{"class":1020}," \"unknown\"\n",[913,1615,1616,1619,1621],{"class":915,"line":966},[913,1617,1618],{"class":923},"    GitCommit ",[913,1620,1600],{"class":919},[913,1622,1613],{"class":1020},[913,1624,1625],{"class":915,"line":971},[913,1626,1627],{"class":923},")\n",[913,1629,1630],{"class":915,"line":979},[913,1631,931],{"emptyLinePlaceholder":930},[913,1633,1634,1637,1640],{"class":915,"line":984},[913,1635,1636],{"class":919},"func",[913,1638,1639],{"class":1579}," main",[913,1641,1642],{"class":923},"() {\n",[913,1644,1645,1648,1651,1654,1657,1661,1664],{"class":915,"line":992},[913,1646,1647],{"class":923},"    fmt.",[913,1649,1650],{"class":1579},"Printf",[913,1652,1653],{"class":923},"(",[913,1655,1656],{"class":1020},"\"Version: ",[913,1658,1660],{"class":1659},"sBjJW","%s\\n",[913,1662,1663],{"class":1020},"\"",[913,1665,1666],{"class":923},", Version)\n",[913,1668,1669,1671,1673,1675,1678,1680,1682],{"class":915,"line":997},[913,1670,1647],{"class":923},[913,1672,1650],{"class":1579},[913,1674,1653],{"class":923},[913,1676,1677],{"class":1020},"\"Build Time: ",[913,1679,1660],{"class":1659},[913,1681,1663],{"class":1020},[913,1683,1684],{"class":923},", BuildTime)\n",[913,1686,1687,1689,1691,1693,1696,1698,1700],{"class":915,"line":1006},[913,1688,1647],{"class":923},[913,1690,1650],{"class":1579},[913,1692,1653],{"class":923},[913,1694,1695],{"class":1020},"\"Git Commit: ",[913,1697,1660],{"class":1659},[913,1699,1663],{"class":1020},[913,1701,1702],{"class":923},", GitCommit)\n",[913,1704,1705],{"class":915,"line":1011},[913,1706,1707],{"class":1038},"    \u002F\u002F ...\n",[913,1709,1710],{"class":915,"line":1117},[913,1711,1712],{"class":923},"}\n",[905,1714,1718],{"className":1715,"code":1716,"language":1717,"meta":11,"style":11},"language-bash shiki shiki-themes github-light github-light github-dark","# 构建\ndocker build \\\n    --build-arg VERSION=v1.0.0 \\\n    --build-arg BUILD_TIME=$(date -u +\"%Y-%m-%dT%H:%M:%SZ\") \\\n    --build-arg GIT_COMMIT=$(git rev-parse HEAD) \\\n    -t myapp:v1.0.0 .\n","bash",[910,1719,1720,1725,1735,1745,1770,1792],{"__ignoreMap":11},[913,1721,1722],{"class":915,"line":916},[913,1723,1724],{"class":1038},"# 构建\n",[913,1726,1727,1730,1733],{"class":915,"line":927},[913,1728,1729],{"class":1579},"docker",[913,1731,1732],{"class":1020}," build",[913,1734,1325],{"class":1659},[913,1736,1737,1740,1743],{"class":915,"line":934},[913,1738,1739],{"class":1659},"    --build-arg",[913,1741,1742],{"class":1020}," VERSION=v1.0.0",[913,1744,1325],{"class":1659},[913,1746,1747,1749,1752,1755,1758,1761,1764,1767],{"class":915,"line":943},[913,1748,1739],{"class":1659},[913,1750,1751],{"class":1020}," BUILD_TIME=",[913,1753,1754],{"class":923},"$(",[913,1756,1757],{"class":1579},"date",[913,1759,1760],{"class":1659}," -u",[913,1762,1763],{"class":1020}," +\"%Y-%m-%dT%H:%M:%SZ\"",[913,1765,1766],{"class":923},") ",[913,1768,1769],{"class":1659},"\\\n",[913,1771,1772,1774,1777,1779,1782,1785,1788,1790],{"class":915,"line":948},[913,1773,1739],{"class":1659},[913,1775,1776],{"class":1020}," GIT_COMMIT=",[913,1778,1754],{"class":923},[913,1780,1781],{"class":1579},"git",[913,1783,1784],{"class":1020}," rev-parse",[913,1786,1787],{"class":1020}," HEAD",[913,1789,1766],{"class":923},[913,1791,1769],{"class":1659},[913,1793,1794,1797,1800],{"class":915,"line":957},[913,1795,1796],{"class":1659},"    -t",[913,1798,1799],{"class":1020}," myapp:v1.0.0",[913,1801,1802],{"class":1020}," .\n",[895,1804,1806],{"id":1805},"docker-compose","Docker Compose",[900,1808,1809],{"id":1809},"基础配置",[905,1811,1815],{"className":1812,"code":1813,"language":1814,"meta":11,"style":11},"language-yaml shiki shiki-themes github-light github-light github-dark","# docker-compose.yml\nversion: '3.8'\n\nservices:\n  app:\n    build: .\n    ports:\n      - \"8080:8080\"\n    environment:\n      - APP_ENV=production\n      - DB_HOST=mysql\n      - REDIS_HOST=redis\n    depends_on:\n      - mysql\n      - redis\n    networks:\n      - app-network\n\n  mysql:\n    image: mysql:8.0\n    environment:\n      MYSQL_ROOT_PASSWORD: password\n      MYSQL_DATABASE: mydb\n    volumes:\n      - mysql-data:\u002Fvar\u002Flib\u002Fmysql\n    networks:\n      - app-network\n\n  redis:\n    image: redis:7-alpine\n    networks:\n      - app-network\n\nnetworks:\n  app-network:\n    driver: bridge\n\nvolumes:\n  mysql-data:\n","yaml",[910,1816,1817,1822,1834,1838,1846,1853,1863,1870,1878,1885,1892,1899,1906,1913,1920,1927,1934,1941,1945,1952,1962,1968,1978,1988,1995,2002,2008,2014,2018,2025,2034,2040,2046,2050,2058,2066,2077,2082,2090],{"__ignoreMap":11},[913,1818,1819],{"class":915,"line":916},[913,1820,1821],{"class":1038},"# docker-compose.yml\n",[913,1823,1824,1828,1831],{"class":915,"line":927},[913,1825,1827],{"class":1826},"sovSZ","version",[913,1829,1830],{"class":923},": ",[913,1832,1833],{"class":1020},"'3.8'\n",[913,1835,1836],{"class":915,"line":934},[913,1837,931],{"emptyLinePlaceholder":930},[913,1839,1840,1843],{"class":915,"line":943},[913,1841,1842],{"class":1826},"services",[913,1844,1845],{"class":923},":\n",[913,1847,1848,1851],{"class":915,"line":948},[913,1849,1850],{"class":1826},"  app",[913,1852,1845],{"class":923},[913,1854,1855,1858,1860],{"class":915,"line":957},[913,1856,1857],{"class":1826},"    build",[913,1859,1830],{"class":923},[913,1861,1862],{"class":1659},".\n",[913,1864,1865,1868],{"class":915,"line":966},[913,1866,1867],{"class":1826},"    ports",[913,1869,1845],{"class":923},[913,1871,1872,1875],{"class":915,"line":971},[913,1873,1874],{"class":923},"      - ",[913,1876,1877],{"class":1020},"\"8080:8080\"\n",[913,1879,1880,1883],{"class":915,"line":979},[913,1881,1882],{"class":1826},"    environment",[913,1884,1845],{"class":923},[913,1886,1887,1889],{"class":915,"line":984},[913,1888,1874],{"class":923},[913,1890,1891],{"class":1020},"APP_ENV=production\n",[913,1893,1894,1896],{"class":915,"line":992},[913,1895,1874],{"class":923},[913,1897,1898],{"class":1020},"DB_HOST=mysql\n",[913,1900,1901,1903],{"class":915,"line":997},[913,1902,1874],{"class":923},[913,1904,1905],{"class":1020},"REDIS_HOST=redis\n",[913,1907,1908,1911],{"class":915,"line":1006},[913,1909,1910],{"class":1826},"    depends_on",[913,1912,1845],{"class":923},[913,1914,1915,1917],{"class":915,"line":1011},[913,1916,1874],{"class":923},[913,1918,1919],{"class":1020},"mysql\n",[913,1921,1922,1924],{"class":915,"line":1117},[913,1923,1874],{"class":923},[913,1925,1926],{"class":1020},"redis\n",[913,1928,1929,1932],{"class":915,"line":1122},[913,1930,1931],{"class":1826},"    networks",[913,1933,1845],{"class":923},[913,1935,1936,1938],{"class":915,"line":1128},[913,1937,1874],{"class":923},[913,1939,1940],{"class":1020},"app-network\n",[913,1942,1943],{"class":915,"line":1136},[913,1944,931],{"emptyLinePlaceholder":930},[913,1946,1947,1950],{"class":915,"line":1141},[913,1948,1949],{"class":1826},"  mysql",[913,1951,1845],{"class":923},[913,1953,1954,1957,1959],{"class":915,"line":1147},[913,1955,1956],{"class":1826},"    image",[913,1958,1830],{"class":923},[913,1960,1961],{"class":1020},"mysql:8.0\n",[913,1963,1964,1966],{"class":915,"line":1155},[913,1965,1882],{"class":1826},[913,1967,1845],{"class":923},[913,1969,1970,1973,1975],{"class":915,"line":1160},[913,1971,1972],{"class":1826},"      MYSQL_ROOT_PASSWORD",[913,1974,1830],{"class":923},[913,1976,1977],{"class":1020},"password\n",[913,1979,1980,1983,1985],{"class":915,"line":1167},[913,1981,1982],{"class":1826},"      MYSQL_DATABASE",[913,1984,1830],{"class":923},[913,1986,1987],{"class":1020},"mydb\n",[913,1989,1990,1993],{"class":915,"line":1172},[913,1991,1992],{"class":1826},"    volumes",[913,1994,1845],{"class":923},[913,1996,1997,1999],{"class":915,"line":1178},[913,1998,1874],{"class":923},[913,2000,2001],{"class":1020},"mysql-data:\u002Fvar\u002Flib\u002Fmysql\n",[913,2003,2004,2006],{"class":915,"line":1186},[913,2005,1931],{"class":1826},[913,2007,1845],{"class":923},[913,2009,2010,2012],{"class":915,"line":1194},[913,2011,1874],{"class":923},[913,2013,1940],{"class":1020},[913,2015,2016],{"class":915,"line":1199},[913,2017,931],{"emptyLinePlaceholder":930},[913,2019,2020,2023],{"class":915,"line":1205},[913,2021,2022],{"class":1826},"  redis",[913,2024,1845],{"class":923},[913,2026,2027,2029,2031],{"class":915,"line":1214},[913,2028,1956],{"class":1826},[913,2030,1830],{"class":923},[913,2032,2033],{"class":1020},"redis:7-alpine\n",[913,2035,2036,2038],{"class":915,"line":1219},[913,2037,1931],{"class":1826},[913,2039,1845],{"class":923},[913,2041,2042,2044],{"class":915,"line":1226},[913,2043,1874],{"class":923},[913,2045,1940],{"class":1020},[913,2047,2048],{"class":915,"line":1231},[913,2049,931],{"emptyLinePlaceholder":930},[913,2051,2053,2056],{"class":915,"line":2052},34,[913,2054,2055],{"class":1826},"networks",[913,2057,1845],{"class":923},[913,2059,2061,2064],{"class":915,"line":2060},35,[913,2062,2063],{"class":1826},"  app-network",[913,2065,1845],{"class":923},[913,2067,2069,2072,2074],{"class":915,"line":2068},36,[913,2070,2071],{"class":1826},"    driver",[913,2073,1830],{"class":923},[913,2075,2076],{"class":1020},"bridge\n",[913,2078,2080],{"class":915,"line":2079},37,[913,2081,931],{"emptyLinePlaceholder":930},[913,2083,2085,2088],{"class":915,"line":2084},38,[913,2086,2087],{"class":1826},"volumes",[913,2089,1845],{"class":923},[913,2091,2093,2096],{"class":915,"line":2092},39,[913,2094,2095],{"class":1826},"  mysql-data",[913,2097,1845],{"class":923},[900,2099,2100],{"id":2100},"开发环境",[905,2102,2104],{"className":1812,"code":2103,"language":1814,"meta":11,"style":11},"# docker-compose.dev.yml\nversion: '3.8'\n\nservices:\n  app:\n    build:\n      context: .\n      dockerfile: Dockerfile.dev\n    ports:\n      - \"8080:8080\"\n    volumes:\n      - .:\u002Fapp\n    environment:\n      - APP_ENV=development\n      - GIN_MODE=debug\n    command: air  # 热重载\n\n  mysql:\n    image: mysql:8.0\n    ports:\n      - \"3306:3306\"\n    environment:\n      MYSQL_ROOT_PASSWORD: password\n      MYSQL_DATABASE: mydb\n\n  redis:\n    image: redis:7-alpine\n    ports:\n      - \"6379:6379\"\n",[910,2105,2106,2111,2119,2123,2129,2135,2141,2150,2160,2166,2172,2178,2185,2191,2198,2205,2218,2222,2228,2236,2242,2249,2255,2263,2271,2275,2281,2289,2295],{"__ignoreMap":11},[913,2107,2108],{"class":915,"line":916},[913,2109,2110],{"class":1038},"# docker-compose.dev.yml\n",[913,2112,2113,2115,2117],{"class":915,"line":927},[913,2114,1827],{"class":1826},[913,2116,1830],{"class":923},[913,2118,1833],{"class":1020},[913,2120,2121],{"class":915,"line":934},[913,2122,931],{"emptyLinePlaceholder":930},[913,2124,2125,2127],{"class":915,"line":943},[913,2126,1842],{"class":1826},[913,2128,1845],{"class":923},[913,2130,2131,2133],{"class":915,"line":948},[913,2132,1850],{"class":1826},[913,2134,1845],{"class":923},[913,2136,2137,2139],{"class":915,"line":957},[913,2138,1857],{"class":1826},[913,2140,1845],{"class":923},[913,2142,2143,2146,2148],{"class":915,"line":966},[913,2144,2145],{"class":1826},"      context",[913,2147,1830],{"class":923},[913,2149,1862],{"class":1659},[913,2151,2152,2155,2157],{"class":915,"line":971},[913,2153,2154],{"class":1826},"      dockerfile",[913,2156,1830],{"class":923},[913,2158,2159],{"class":1020},"Dockerfile.dev\n",[913,2161,2162,2164],{"class":915,"line":979},[913,2163,1867],{"class":1826},[913,2165,1845],{"class":923},[913,2167,2168,2170],{"class":915,"line":984},[913,2169,1874],{"class":923},[913,2171,1877],{"class":1020},[913,2173,2174,2176],{"class":915,"line":992},[913,2175,1992],{"class":1826},[913,2177,1845],{"class":923},[913,2179,2180,2182],{"class":915,"line":997},[913,2181,1874],{"class":923},[913,2183,2184],{"class":1020},".:\u002Fapp\n",[913,2186,2187,2189],{"class":915,"line":1006},[913,2188,1882],{"class":1826},[913,2190,1845],{"class":923},[913,2192,2193,2195],{"class":915,"line":1011},[913,2194,1874],{"class":923},[913,2196,2197],{"class":1020},"APP_ENV=development\n",[913,2199,2200,2202],{"class":915,"line":1117},[913,2201,1874],{"class":923},[913,2203,2204],{"class":1020},"GIN_MODE=debug\n",[913,2206,2207,2210,2212,2215],{"class":915,"line":1122},[913,2208,2209],{"class":1826},"    command",[913,2211,1830],{"class":923},[913,2213,2214],{"class":1020},"air",[913,2216,2217],{"class":1038},"  # 热重载\n",[913,2219,2220],{"class":915,"line":1128},[913,2221,931],{"emptyLinePlaceholder":930},[913,2223,2224,2226],{"class":915,"line":1136},[913,2225,1949],{"class":1826},[913,2227,1845],{"class":923},[913,2229,2230,2232,2234],{"class":915,"line":1141},[913,2231,1956],{"class":1826},[913,2233,1830],{"class":923},[913,2235,1961],{"class":1020},[913,2237,2238,2240],{"class":915,"line":1147},[913,2239,1867],{"class":1826},[913,2241,1845],{"class":923},[913,2243,2244,2246],{"class":915,"line":1155},[913,2245,1874],{"class":923},[913,2247,2248],{"class":1020},"\"3306:3306\"\n",[913,2250,2251,2253],{"class":915,"line":1160},[913,2252,1882],{"class":1826},[913,2254,1845],{"class":923},[913,2256,2257,2259,2261],{"class":915,"line":1167},[913,2258,1972],{"class":1826},[913,2260,1830],{"class":923},[913,2262,1977],{"class":1020},[913,2264,2265,2267,2269],{"class":915,"line":1172},[913,2266,1982],{"class":1826},[913,2268,1830],{"class":923},[913,2270,1987],{"class":1020},[913,2272,2273],{"class":915,"line":1178},[913,2274,931],{"emptyLinePlaceholder":930},[913,2276,2277,2279],{"class":915,"line":1186},[913,2278,2022],{"class":1826},[913,2280,1845],{"class":923},[913,2282,2283,2285,2287],{"class":915,"line":1194},[913,2284,1956],{"class":1826},[913,2286,1830],{"class":923},[913,2288,2033],{"class":1020},[913,2290,2291,2293],{"class":915,"line":1199},[913,2292,1867],{"class":1826},[913,2294,1845],{"class":923},[913,2296,2297,2299],{"class":915,"line":1205},[913,2298,1874],{"class":923},[913,2300,2301],{"class":1020},"\"6379:6379\"\n",[905,2303,2305],{"className":907,"code":2304,"language":897,"meta":11,"style":11},"# Dockerfile.dev\nFROM golang:1.21\n\nWORKDIR \u002Fapp\n\n# 安装 air（热重载工具）\nRUN go install github.com\u002Fcosmtrek\u002Fair@latest\n\nCOPY go.mod go.sum .\u002F\nRUN go mod download\n\nCMD [\"air\"]\n",[910,2306,2307,2312,2318,2322,2328,2332,2337,2344,2348,2354,2360,2364],{"__ignoreMap":11},[913,2308,2309],{"class":915,"line":916},[913,2310,2311],{"class":1038},"# Dockerfile.dev\n",[913,2313,2314,2316],{"class":915,"line":927},[913,2315,920],{"class":919},[913,2317,924],{"class":923},[913,2319,2320],{"class":915,"line":934},[913,2321,931],{"emptyLinePlaceholder":930},[913,2323,2324,2326],{"class":915,"line":943},[913,2325,937],{"class":919},[913,2327,940],{"class":923},[913,2329,2330],{"class":915,"line":948},[913,2331,931],{"emptyLinePlaceholder":930},[913,2333,2334],{"class":915,"line":957},[913,2335,2336],{"class":1038},"# 安装 air（热重载工具）\n",[913,2338,2339,2341],{"class":915,"line":966},[913,2340,960],{"class":919},[913,2342,2343],{"class":923}," go install github.com\u002Fcosmtrek\u002Fair@latest\n",[913,2345,2346],{"class":915,"line":971},[913,2347,931],{"emptyLinePlaceholder":930},[913,2349,2350,2352],{"class":915,"line":979},[913,2351,951],{"class":919},[913,2353,954],{"class":923},[913,2355,2356,2358],{"class":915,"line":984},[913,2357,960],{"class":919},[913,2359,963],{"class":923},[913,2361,2362],{"class":915,"line":992},[913,2363,931],{"emptyLinePlaceholder":930},[913,2365,2366,2368,2370,2373],{"class":915,"line":997},[913,2367,1014],{"class":919},[913,2369,1017],{"class":923},[913,2371,2372],{"class":1020},"\"air\"",[913,2374,1024],{"class":923},[900,2376,2377],{"id":2377},"生产环境",[905,2379,2381],{"className":1812,"code":2380,"language":1814,"meta":11,"style":11},"# docker-compose.prod.yml\nversion: '3.8'\n\nservices:\n  app:\n    image: myapp:latest\n    deploy:\n      replicas: 3\n      resources:\n        limits:\n          cpus: '0.5'\n          memory: 512M\n    ports:\n      - \"8080:8080\"\n    environment:\n      - APP_ENV=production\n    healthcheck:\n      test: [\"CMD\", \"wget\", \"-q\", \"--spider\", \"http:\u002F\u002Flocalhost:8080\u002Fhealth\"]\n      interval: 30s\n      timeout: 10s\n      retries: 3\n      start_period: 40s\n    logging:\n      driver: \"json-file\"\n      options:\n        max-size: \"10m\"\n        max-file: \"3\"\n",[910,2382,2383,2388,2396,2400,2406,2412,2421,2428,2438,2445,2452,2462,2472,2478,2484,2490,2496,2503,2537,2547,2557,2566,2576,2583,2593,2600,2610],{"__ignoreMap":11},[913,2384,2385],{"class":915,"line":916},[913,2386,2387],{"class":1038},"# docker-compose.prod.yml\n",[913,2389,2390,2392,2394],{"class":915,"line":927},[913,2391,1827],{"class":1826},[913,2393,1830],{"class":923},[913,2395,1833],{"class":1020},[913,2397,2398],{"class":915,"line":934},[913,2399,931],{"emptyLinePlaceholder":930},[913,2401,2402,2404],{"class":915,"line":943},[913,2403,1842],{"class":1826},[913,2405,1845],{"class":923},[913,2407,2408,2410],{"class":915,"line":948},[913,2409,1850],{"class":1826},[913,2411,1845],{"class":923},[913,2413,2414,2416,2418],{"class":915,"line":957},[913,2415,1956],{"class":1826},[913,2417,1830],{"class":923},[913,2419,2420],{"class":1020},"myapp:latest\n",[913,2422,2423,2426],{"class":915,"line":966},[913,2424,2425],{"class":1826},"    deploy",[913,2427,1845],{"class":923},[913,2429,2430,2433,2435],{"class":915,"line":971},[913,2431,2432],{"class":1826},"      replicas",[913,2434,1830],{"class":923},[913,2436,2437],{"class":1659},"3\n",[913,2439,2440,2443],{"class":915,"line":979},[913,2441,2442],{"class":1826},"      resources",[913,2444,1845],{"class":923},[913,2446,2447,2450],{"class":915,"line":984},[913,2448,2449],{"class":1826},"        limits",[913,2451,1845],{"class":923},[913,2453,2454,2457,2459],{"class":915,"line":992},[913,2455,2456],{"class":1826},"          cpus",[913,2458,1830],{"class":923},[913,2460,2461],{"class":1020},"'0.5'\n",[913,2463,2464,2467,2469],{"class":915,"line":997},[913,2465,2466],{"class":1826},"          memory",[913,2468,1830],{"class":923},[913,2470,2471],{"class":1020},"512M\n",[913,2473,2474,2476],{"class":915,"line":1006},[913,2475,1867],{"class":1826},[913,2477,1845],{"class":923},[913,2479,2480,2482],{"class":915,"line":1011},[913,2481,1874],{"class":923},[913,2483,1877],{"class":1020},[913,2485,2486,2488],{"class":915,"line":1117},[913,2487,1882],{"class":1826},[913,2489,1845],{"class":923},[913,2491,2492,2494],{"class":915,"line":1122},[913,2493,1874],{"class":923},[913,2495,1891],{"class":1020},[913,2497,2498,2501],{"class":915,"line":1128},[913,2499,2500],{"class":1826},"    healthcheck",[913,2502,1845],{"class":923},[913,2504,2505,2508,2511,2514,2517,2520,2522,2525,2527,2530,2532,2535],{"class":915,"line":1136},[913,2506,2507],{"class":1826},"      test",[913,2509,2510],{"class":923},": [",[913,2512,2513],{"class":1020},"\"CMD\"",[913,2515,2516],{"class":923},", ",[913,2518,2519],{"class":1020},"\"wget\"",[913,2521,2516],{"class":923},[913,2523,2524],{"class":1020},"\"-q\"",[913,2526,2516],{"class":923},[913,2528,2529],{"class":1020},"\"--spider\"",[913,2531,2516],{"class":923},[913,2533,2534],{"class":1020},"\"http:\u002F\u002Flocalhost:8080\u002Fhealth\"",[913,2536,1024],{"class":923},[913,2538,2539,2542,2544],{"class":915,"line":1141},[913,2540,2541],{"class":1826},"      interval",[913,2543,1830],{"class":923},[913,2545,2546],{"class":1020},"30s\n",[913,2548,2549,2552,2554],{"class":915,"line":1147},[913,2550,2551],{"class":1826},"      timeout",[913,2553,1830],{"class":923},[913,2555,2556],{"class":1020},"10s\n",[913,2558,2559,2562,2564],{"class":915,"line":1155},[913,2560,2561],{"class":1826},"      retries",[913,2563,1830],{"class":923},[913,2565,2437],{"class":1659},[913,2567,2568,2571,2573],{"class":915,"line":1160},[913,2569,2570],{"class":1826},"      start_period",[913,2572,1830],{"class":923},[913,2574,2575],{"class":1020},"40s\n",[913,2577,2578,2581],{"class":915,"line":1167},[913,2579,2580],{"class":1826},"    logging",[913,2582,1845],{"class":923},[913,2584,2585,2588,2590],{"class":915,"line":1172},[913,2586,2587],{"class":1826},"      driver",[913,2589,1830],{"class":923},[913,2591,2592],{"class":1020},"\"json-file\"\n",[913,2594,2595,2598],{"class":915,"line":1178},[913,2596,2597],{"class":1826},"      options",[913,2599,1845],{"class":923},[913,2601,2602,2605,2607],{"class":915,"line":1186},[913,2603,2604],{"class":1826},"        max-size",[913,2606,1830],{"class":923},[913,2608,2609],{"class":1020},"\"10m\"\n",[913,2611,2612,2615,2617],{"class":915,"line":1194},[913,2613,2614],{"class":1826},"        max-file",[913,2616,1830],{"class":923},[913,2618,2619],{"class":1020},"\"3\"\n",[895,2621,2622],{"id":2622},"优化技巧",[900,2624,2626],{"id":2625},"_1-利用缓存","1. 利用缓存",[905,2628,2630],{"className":907,"code":2629,"language":897,"meta":11,"style":11},"# 先复制依赖文件\nCOPY go.mod go.sum .\u002F\nRUN go mod download\n\n# 再复制源码\nCOPY . .\n\n# 这样源码变化时，不需要重新下载依赖\n",[910,2631,2632,2637,2643,2649,2653,2658,2664,2668],{"__ignoreMap":11},[913,2633,2634],{"class":915,"line":916},[913,2635,2636],{"class":1038},"# 先复制依赖文件\n",[913,2638,2639,2641],{"class":915,"line":927},[913,2640,951],{"class":919},[913,2642,954],{"class":923},[913,2644,2645,2647],{"class":915,"line":934},[913,2646,960],{"class":919},[913,2648,963],{"class":923},[913,2650,2651],{"class":915,"line":943},[913,2652,931],{"emptyLinePlaceholder":930},[913,2654,2655],{"class":915,"line":948},[913,2656,2657],{"class":1038},"# 再复制源码\n",[913,2659,2660,2662],{"class":915,"line":957},[913,2661,951],{"class":919},[913,2663,976],{"class":923},[913,2665,2666],{"class":915,"line":966},[913,2667,931],{"emptyLinePlaceholder":930},[913,2669,2670],{"class":915,"line":971},[913,2671,2672],{"class":1038},"# 这样源码变化时，不需要重新下载依赖\n",[900,2674,2676],{"id":2675},"_2-使用-dockerignore","2. 使用 .dockerignore",[905,2678,2683],{"className":2679,"code":2681,"language":2682},[2680],"language-text","# .dockerignore\n.git\n.gitignore\n*.md\nDockerfile\ndocker-compose*.yml\n.env*\ntmp\u002F\nlogs\u002F\n*.test\n*_test.go\n","text",[910,2684,2681],{"__ignoreMap":11},[900,2686,2688],{"id":2687},"_3-减小镜像大小","3. 减小镜像大小",[905,2690,2692],{"className":907,"code":2691,"language":897,"meta":11,"style":11},"# 使用 alpine 镜像\nFROM golang:1.21-alpine\n\n# 删除不需要的文件\nRUN rm -rf \u002Fvar\u002Fcache\u002Fapk\u002F*\n\n# 使用 -ldflags 减小二进制大小\nRUN go build -ldflags=\"-w -s\" -o main .\n\n# -w 去除调试信息\n# -s 去除符号表\n",[910,2693,2694,2699,2706,2710,2715,2722,2726,2731,2743,2747,2752],{"__ignoreMap":11},[913,2695,2696],{"class":915,"line":916},[913,2697,2698],{"class":1038},"# 使用 alpine 镜像\n",[913,2700,2701,2703],{"class":915,"line":927},[913,2702,920],{"class":919},[913,2704,2705],{"class":923}," golang:1.21-alpine\n",[913,2707,2708],{"class":915,"line":934},[913,2709,931],{"emptyLinePlaceholder":930},[913,2711,2712],{"class":915,"line":943},[913,2713,2714],{"class":1038},"# 删除不需要的文件\n",[913,2716,2717,2719],{"class":915,"line":948},[913,2718,960],{"class":919},[913,2720,2721],{"class":923}," rm -rf \u002Fvar\u002Fcache\u002Fapk\u002F*\n",[913,2723,2724],{"class":915,"line":957},[913,2725,931],{"emptyLinePlaceholder":930},[913,2727,2728],{"class":915,"line":966},[913,2729,2730],{"class":1038},"# 使用 -ldflags 减小二进制大小\n",[913,2732,2733,2735,2738,2740],{"class":915,"line":971},[913,2734,960],{"class":919},[913,2736,2737],{"class":923}," go build -ldflags=",[913,2739,1322],{"class":1020},[913,2741,2742],{"class":923}," -o main .\n",[913,2744,2745],{"class":915,"line":979},[913,2746,931],{"emptyLinePlaceholder":930},[913,2748,2749],{"class":915,"line":984},[913,2750,2751],{"class":1038},"# -w 去除调试信息\n",[913,2753,2754],{"class":915,"line":992},[913,2755,2756],{"class":1038},"# -s 去除符号表\n",[900,2758,2760],{"id":2759},"_4-非-root-用户运行","4. 非 root 用户运行",[905,2762,2764],{"className":907,"code":2763,"language":897,"meta":11,"style":11},"FROM alpine:latest\n\n# 创建非 root 用户\nRUN addgroup -S appgroup && adduser -S appuser -G appgroup\n\nWORKDIR \u002Fapp\n\nCOPY --from=builder \u002Fapp\u002Fmain .\n\n# 切换用户\nUSER appuser\n\nEXPOSE 8080\n\nCMD [\".\u002Fmain\"]\n",[910,2765,2766,2772,2776,2781,2788,2792,2798,2802,2808,2812,2817,2825,2829,2835,2839],{"__ignoreMap":11},[913,2767,2768,2770],{"class":915,"line":916},[913,2769,920],{"class":919},[913,2771,1133],{"class":923},[913,2773,2774],{"class":915,"line":927},[913,2775,931],{"emptyLinePlaceholder":930},[913,2777,2778],{"class":915,"line":934},[913,2779,2780],{"class":1038},"# 创建非 root 用户\n",[913,2782,2783,2785],{"class":915,"line":943},[913,2784,960],{"class":919},[913,2786,2787],{"class":923}," addgroup -S appgroup && adduser -S appuser -G appgroup\n",[913,2789,2790],{"class":915,"line":948},[913,2791,931],{"emptyLinePlaceholder":930},[913,2793,2794,2796],{"class":915,"line":957},[913,2795,937],{"class":919},[913,2797,940],{"class":923},[913,2799,2800],{"class":915,"line":966},[913,2801,931],{"emptyLinePlaceholder":930},[913,2803,2804,2806],{"class":915,"line":971},[913,2805,951],{"class":919},[913,2807,1183],{"class":923},[913,2809,2810],{"class":915,"line":979},[913,2811,931],{"emptyLinePlaceholder":930},[913,2813,2814],{"class":915,"line":984},[913,2815,2816],{"class":1038},"# 切换用户\n",[913,2818,2819,2822],{"class":915,"line":992},[913,2820,2821],{"class":919},"USER",[913,2823,2824],{"class":923}," appuser\n",[913,2826,2827],{"class":915,"line":997},[913,2828,931],{"emptyLinePlaceholder":930},[913,2830,2831,2833],{"class":915,"line":1006},[913,2832,1000],{"class":919},[913,2834,1003],{"class":923},[913,2836,2837],{"class":915,"line":1011},[913,2838,931],{"emptyLinePlaceholder":930},[913,2840,2841,2843,2845,2847],{"class":915,"line":1117},[913,2842,1014],{"class":919},[913,2844,1017],{"class":923},[913,2846,1021],{"class":1020},[913,2848,1024],{"class":923},[900,2850,2852],{"id":2851},"_5-健康检查","5. 健康检查",[905,2854,2856],{"className":907,"code":2855,"language":897,"meta":11,"style":11},"HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \\\n    CMD wget -q --spider http:\u002F\u002Flocalhost:8080\u002Fhealth || exit 1\n",[910,2857,2858,2866],{"__ignoreMap":11},[913,2859,2860,2863],{"class":915,"line":916},[913,2861,2862],{"class":919},"HEALTHCHECK",[913,2864,2865],{"class":923}," --interval=30s --timeout=3s --start-period=5s --retries=3 \\\n",[913,2867,2868,2871],{"class":915,"line":927},[913,2869,2870],{"class":919},"    CMD",[913,2872,2873],{"class":923}," wget -q --spider http:\u002F\u002Flocalhost:8080\u002Fhealth || exit 1\n",[905,2875,2877],{"className":1562,"code":2876,"language":1564,"meta":11,"style":11},"\u002F\u002F 健康检查接口\nr.GET(\"\u002Fhealth\", func(c *gin.Context) {\n    c.JSON(200, gin.H{\n        \"status\": \"ok\",\n        \"time\":   time.Now().Format(time.RFC3339),\n    })\n})\n",[910,2878,2879,2884,2922,2947,2960,2980,2985],{"__ignoreMap":11},[913,2880,2881],{"class":915,"line":916},[913,2882,2883],{"class":1038},"\u002F\u002F 健康检查接口\n",[913,2885,2886,2889,2892,2894,2897,2899,2901,2903,2907,2910,2913,2916,2919],{"class":915,"line":927},[913,2887,2888],{"class":923},"r.",[913,2890,2891],{"class":1579},"GET",[913,2893,1653],{"class":923},[913,2895,2896],{"class":1020},"\"\u002Fhealth\"",[913,2898,2516],{"class":923},[913,2900,1636],{"class":919},[913,2902,1653],{"class":923},[913,2904,2906],{"class":2905},"sP4rz","c",[913,2908,2909],{"class":919}," *",[913,2911,2912],{"class":1579},"gin",[913,2914,2915],{"class":923},".",[913,2917,2918],{"class":1579},"Context",[913,2920,2921],{"class":923},") {\n",[913,2923,2924,2927,2930,2932,2935,2937,2939,2941,2944],{"class":915,"line":934},[913,2925,2926],{"class":923},"    c.",[913,2928,2929],{"class":1579},"JSON",[913,2931,1653],{"class":923},[913,2933,2934],{"class":1659},"200",[913,2936,2516],{"class":923},[913,2938,2912],{"class":1579},[913,2940,2915],{"class":923},[913,2942,2943],{"class":1579},"H",[913,2945,2946],{"class":923},"{\n",[913,2948,2949,2952,2954,2957],{"class":915,"line":943},[913,2950,2951],{"class":1020},"        \"status\"",[913,2953,1830],{"class":923},[913,2955,2956],{"class":1020},"\"ok\"",[913,2958,2959],{"class":923},",\n",[913,2961,2962,2965,2968,2971,2974,2977],{"class":915,"line":948},[913,2963,2964],{"class":1020},"        \"time\"",[913,2966,2967],{"class":923},":   time.",[913,2969,2970],{"class":1579},"Now",[913,2972,2973],{"class":923},"().",[913,2975,2976],{"class":1579},"Format",[913,2978,2979],{"class":923},"(time.RFC3339),\n",[913,2981,2982],{"class":915,"line":957},[913,2983,2984],{"class":923},"    })\n",[913,2986,2987],{"class":915,"line":966},[913,2988,2989],{"class":923},"})\n",[895,2991,2992],{"id":2992},"常用命令",[905,2994,2996],{"className":1715,"code":2995,"language":1717,"meta":11,"style":11},"# 构建镜像\ndocker build -t myapp:latest .\n\n# 运行容器\ndocker run -d -p 8080:8080 --name myapp myapp:latest\n\n# 查看日志\ndocker logs -f myapp\n\n# 进入容器\ndocker exec -it myapp sh\n\n# Docker Compose\ndocker-compose up -d\ndocker-compose down\ndocker-compose logs -f app\n\n# 清理\ndocker system prune -a\ndocker volume prune\n",[910,2997,2998,3003,3017,3021,3026,3051,3055,3060,3073,3077,3082,3097,3101,3106,3116,3123,3134,3138,3143,3156],{"__ignoreMap":11},[913,2999,3000],{"class":915,"line":916},[913,3001,3002],{"class":1038},"# 构建镜像\n",[913,3004,3005,3007,3009,3012,3015],{"class":915,"line":927},[913,3006,1729],{"class":1579},[913,3008,1732],{"class":1020},[913,3010,3011],{"class":1659}," -t",[913,3013,3014],{"class":1020}," myapp:latest",[913,3016,1802],{"class":1020},[913,3018,3019],{"class":915,"line":934},[913,3020,931],{"emptyLinePlaceholder":930},[913,3022,3023],{"class":915,"line":943},[913,3024,3025],{"class":1038},"# 运行容器\n",[913,3027,3028,3030,3033,3036,3039,3042,3045,3048],{"class":915,"line":948},[913,3029,1729],{"class":1579},[913,3031,3032],{"class":1020}," run",[913,3034,3035],{"class":1659}," -d",[913,3037,3038],{"class":1659}," -p",[913,3040,3041],{"class":1020}," 8080:8080",[913,3043,3044],{"class":1659}," --name",[913,3046,3047],{"class":1020}," myapp",[913,3049,3050],{"class":1020}," myapp:latest\n",[913,3052,3053],{"class":915,"line":957},[913,3054,931],{"emptyLinePlaceholder":930},[913,3056,3057],{"class":915,"line":966},[913,3058,3059],{"class":1038},"# 查看日志\n",[913,3061,3062,3064,3067,3070],{"class":915,"line":971},[913,3063,1729],{"class":1579},[913,3065,3066],{"class":1020}," logs",[913,3068,3069],{"class":1659}," -f",[913,3071,3072],{"class":1020}," myapp\n",[913,3074,3075],{"class":915,"line":979},[913,3076,931],{"emptyLinePlaceholder":930},[913,3078,3079],{"class":915,"line":984},[913,3080,3081],{"class":1038},"# 进入容器\n",[913,3083,3084,3086,3089,3092,3094],{"class":915,"line":992},[913,3085,1729],{"class":1579},[913,3087,3088],{"class":1020}," exec",[913,3090,3091],{"class":1659}," -it",[913,3093,3047],{"class":1020},[913,3095,3096],{"class":1020}," sh\n",[913,3098,3099],{"class":915,"line":997},[913,3100,931],{"emptyLinePlaceholder":930},[913,3102,3103],{"class":915,"line":1006},[913,3104,3105],{"class":1038},"# Docker Compose\n",[913,3107,3108,3110,3113],{"class":915,"line":1011},[913,3109,1805],{"class":1579},[913,3111,3112],{"class":1020}," up",[913,3114,3115],{"class":1659}," -d\n",[913,3117,3118,3120],{"class":915,"line":1117},[913,3119,1805],{"class":1579},[913,3121,3122],{"class":1020}," down\n",[913,3124,3125,3127,3129,3131],{"class":915,"line":1122},[913,3126,1805],{"class":1579},[913,3128,3066],{"class":1020},[913,3130,3069],{"class":1659},[913,3132,3133],{"class":1020}," app\n",[913,3135,3136],{"class":915,"line":1128},[913,3137,931],{"emptyLinePlaceholder":930},[913,3139,3140],{"class":915,"line":1136},[913,3141,3142],{"class":1038},"# 清理\n",[913,3144,3145,3147,3150,3153],{"class":915,"line":1141},[913,3146,1729],{"class":1579},[913,3148,3149],{"class":1020}," system",[913,3151,3152],{"class":1020}," prune",[913,3154,3155],{"class":1659}," -a\n",[913,3157,3158,3160,3163],{"class":915,"line":1147},[913,3159,1729],{"class":1579},[913,3161,3162],{"class":1020}," volume",[913,3164,3165],{"class":1020}," prune\n",[895,3167,3169],{"id":3168},"cicd-集成","CI\u002FCD 集成",[900,3171,3173],{"id":3172},"github-actions","GitHub Actions",[905,3175,3177],{"className":1812,"code":3176,"language":1814,"meta":11,"style":11},"# .github\u002Fworkflows\u002Fdocker.yml\nname: Docker Build\n\non:\n  push:\n    branches: [main]\n    tags: ['v*']\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v3\n      \n      - name: Set up Docker Buildx\n        uses: docker\u002Fsetup-buildx-action@v2\n      \n      - name: Login to Docker Hub\n        uses: docker\u002Flogin-action@v2\n        with:\n          username: ${{ secrets.DOCKER_USERNAME }}\n          password: ${{ secrets.DOCKER_PASSWORD }}\n      \n      - name: Build and push\n        uses: docker\u002Fbuild-push-action@v4\n        with:\n          context: .\n          push: true\n          tags: |\n            myrepo\u002Fmyapp:latest\n            myrepo\u002Fmyapp:${{ github.sha }}\n          cache-from: type=gha\n          cache-to: type=gha,mode=max\n",[910,3178,3179,3184,3194,3198,3205,3212,3224,3236,3240,3247,3254,3264,3271,3283,3288,3299,3309,3313,3324,3333,3340,3350,3360,3364,3375,3384,3390,3399,3409,3419,3424,3429,3439],{"__ignoreMap":11},[913,3180,3181],{"class":915,"line":916},[913,3182,3183],{"class":1038},"# .github\u002Fworkflows\u002Fdocker.yml\n",[913,3185,3186,3189,3191],{"class":915,"line":927},[913,3187,3188],{"class":1826},"name",[913,3190,1830],{"class":923},[913,3192,3193],{"class":1020},"Docker Build\n",[913,3195,3196],{"class":915,"line":934},[913,3197,931],{"emptyLinePlaceholder":930},[913,3199,3200,3203],{"class":915,"line":943},[913,3201,3202],{"class":1659},"on",[913,3204,1845],{"class":923},[913,3206,3207,3210],{"class":915,"line":948},[913,3208,3209],{"class":1826},"  push",[913,3211,1845],{"class":923},[913,3213,3214,3217,3219,3222],{"class":915,"line":957},[913,3215,3216],{"class":1826},"    branches",[913,3218,2510],{"class":923},[913,3220,3221],{"class":1020},"main",[913,3223,1024],{"class":923},[913,3225,3226,3229,3231,3234],{"class":915,"line":966},[913,3227,3228],{"class":1826},"    tags",[913,3230,2510],{"class":923},[913,3232,3233],{"class":1020},"'v*'",[913,3235,1024],{"class":923},[913,3237,3238],{"class":915,"line":971},[913,3239,931],{"emptyLinePlaceholder":930},[913,3241,3242,3245],{"class":915,"line":979},[913,3243,3244],{"class":1826},"jobs",[913,3246,1845],{"class":923},[913,3248,3249,3252],{"class":915,"line":984},[913,3250,3251],{"class":1826},"  build",[913,3253,1845],{"class":923},[913,3255,3256,3259,3261],{"class":915,"line":992},[913,3257,3258],{"class":1826},"    runs-on",[913,3260,1830],{"class":923},[913,3262,3263],{"class":1020},"ubuntu-latest\n",[913,3265,3266,3269],{"class":915,"line":997},[913,3267,3268],{"class":1826},"    steps",[913,3270,1845],{"class":923},[913,3272,3273,3275,3278,3280],{"class":915,"line":1006},[913,3274,1874],{"class":923},[913,3276,3277],{"class":1826},"uses",[913,3279,1830],{"class":923},[913,3281,3282],{"class":1020},"actions\u002Fcheckout@v3\n",[913,3284,3285],{"class":915,"line":1011},[913,3286,3287],{"class":923},"      \n",[913,3289,3290,3292,3294,3296],{"class":915,"line":1117},[913,3291,1874],{"class":923},[913,3293,3188],{"class":1826},[913,3295,1830],{"class":923},[913,3297,3298],{"class":1020},"Set up Docker Buildx\n",[913,3300,3301,3304,3306],{"class":915,"line":1122},[913,3302,3303],{"class":1826},"        uses",[913,3305,1830],{"class":923},[913,3307,3308],{"class":1020},"docker\u002Fsetup-buildx-action@v2\n",[913,3310,3311],{"class":915,"line":1128},[913,3312,3287],{"class":923},[913,3314,3315,3317,3319,3321],{"class":915,"line":1136},[913,3316,1874],{"class":923},[913,3318,3188],{"class":1826},[913,3320,1830],{"class":923},[913,3322,3323],{"class":1020},"Login to Docker Hub\n",[913,3325,3326,3328,3330],{"class":915,"line":1141},[913,3327,3303],{"class":1826},[913,3329,1830],{"class":923},[913,3331,3332],{"class":1020},"docker\u002Flogin-action@v2\n",[913,3334,3335,3338],{"class":915,"line":1147},[913,3336,3337],{"class":1826},"        with",[913,3339,1845],{"class":923},[913,3341,3342,3345,3347],{"class":915,"line":1155},[913,3343,3344],{"class":1826},"          username",[913,3346,1830],{"class":923},[913,3348,3349],{"class":1020},"${{ secrets.DOCKER_USERNAME }}\n",[913,3351,3352,3355,3357],{"class":915,"line":1160},[913,3353,3354],{"class":1826},"          password",[913,3356,1830],{"class":923},[913,3358,3359],{"class":1020},"${{ secrets.DOCKER_PASSWORD }}\n",[913,3361,3362],{"class":915,"line":1167},[913,3363,3287],{"class":923},[913,3365,3366,3368,3370,3372],{"class":915,"line":1172},[913,3367,1874],{"class":923},[913,3369,3188],{"class":1826},[913,3371,1830],{"class":923},[913,3373,3374],{"class":1020},"Build and push\n",[913,3376,3377,3379,3381],{"class":915,"line":1178},[913,3378,3303],{"class":1826},[913,3380,1830],{"class":923},[913,3382,3383],{"class":1020},"docker\u002Fbuild-push-action@v4\n",[913,3385,3386,3388],{"class":915,"line":1186},[913,3387,3337],{"class":1826},[913,3389,1845],{"class":923},[913,3391,3392,3395,3397],{"class":915,"line":1194},[913,3393,3394],{"class":1826},"          context",[913,3396,1830],{"class":923},[913,3398,1862],{"class":1659},[913,3400,3401,3404,3406],{"class":915,"line":1199},[913,3402,3403],{"class":1826},"          push",[913,3405,1830],{"class":923},[913,3407,3408],{"class":1659},"true\n",[913,3410,3411,3414,3416],{"class":915,"line":1205},[913,3412,3413],{"class":1826},"          tags",[913,3415,1830],{"class":923},[913,3417,3418],{"class":919},"|\n",[913,3420,3421],{"class":915,"line":1214},[913,3422,3423],{"class":1020},"            myrepo\u002Fmyapp:latest\n",[913,3425,3426],{"class":915,"line":1219},[913,3427,3428],{"class":1020},"            myrepo\u002Fmyapp:${{ github.sha }}\n",[913,3430,3431,3434,3436],{"class":915,"line":1226},[913,3432,3433],{"class":1826},"          cache-from",[913,3435,1830],{"class":923},[913,3437,3438],{"class":1020},"type=gha\n",[913,3440,3441,3444,3446],{"class":915,"line":1231},[913,3442,3443],{"class":1826},"          cache-to",[913,3445,1830],{"class":923},[913,3447,3448],{"class":1020},"type=gha,mode=max\n",[3450,3451,3452],"style",{},"html pre.shiki code .s8jYJ, html code.shiki .s8jYJ{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sxrX7, html code.shiki .sxrX7{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sIIMD, html code.shiki .sIIMD{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .snPdu, html code.shiki .snPdu{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sBjJW, html code.shiki .sBjJW{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sovSZ, html code.shiki .sovSZ{--shiki-light:#22863A;--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sP4rz, html code.shiki .sP4rz{--shiki-light:#E36209;--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":11,"searchDepth":927,"depth":927,"links":3454},[3455,3461,3466,3473,3474],{"id":897,"depth":927,"text":898,"children":3456},[3457,3458,3459,3460],{"id":902,"depth":934,"text":903},{"id":1027,"depth":934,"text":1028},{"id":1242,"depth":934,"text":1242},{"id":1393,"depth":934,"text":1393},{"id":1805,"depth":927,"text":1806,"children":3462},[3463,3464,3465],{"id":1809,"depth":934,"text":1809},{"id":2100,"depth":934,"text":2100},{"id":2377,"depth":934,"text":2377},{"id":2622,"depth":927,"text":2622,"children":3467},[3468,3469,3470,3471,3472],{"id":2625,"depth":934,"text":2626},{"id":2675,"depth":934,"text":2676},{"id":2687,"depth":934,"text":2688},{"id":2759,"depth":934,"text":2760},{"id":2851,"depth":934,"text":2852},{"id":2992,"depth":927,"text":2992},{"id":3168,"depth":927,"text":3169,"children":3475},[3476],{"id":3172,"depth":934,"text":3173},"md",{},{"title":204,"description":205},"golang\u002Fengineering\u002Fdocker","BvVrXyA9CToe58NfUkDjGn5H2jMEAJ2Wlb4S7S2qRoM",1775496424978]