一句话:提出 DAGGER,用智能体 AI 在容器镜像依赖图上动态选择优化策略,实现平均 35.7% 体积缩减且仅 0.2% 破坏率。
容器镜像膨胀会降低云部署效率,因为结构冗余和过期软件包会随着时间形成复杂依赖图,而现有优化方法大多未能充分处理。传统可视化技术依赖用户专业知识进行手动优化,运行时方法需要长执行轨迹来识别并仅保留被访问的依赖;基于静态分析的方法在动态加载或反射场景下缺乏语义可见性,容易导致过近似或欠近似。为此,作者提出动态智能体图引导高效推理器 DAGGER,它根据镜像结构和依赖模式,从一组优化策略中动态选择。DAGGER 的智能体 AI 模块在依赖图表示上进行知识检索,分析并防止移除关键依赖,确保零损失的可运行功能;其知识库由精选样例构建,供智能体 AI 生成优化后的容器镜像。基于生产容器镜像的初步实验表明,与最先进基线相比,DAGGER 平均缩减镜像大小 35.7%,破坏率仅为 0.2%。
Container image (CI) bloat degrades cloud deployment efficiency, as structural redundancy and obsolete package buildup over time result in complex dependency graphs that remain largely unaddressed by current CI optimization methods. Traditional visualization techniques rely on user expertise for manual optimization, whereas runtime methods require long execution traces to identify and retain only accessed dependencies. Conversely, static-analysis-based methods lack semantic visibility in dynamic loading or reflection contexts, leading to over- or under-approximations. To address these limitations, we propose Dynamic Agentic Graph-Guided Efficient Reasoner (DAGGER) that dynamically selects from an ensemble of optimization strategies based on CI structures and dependency patterns. DAGGER’s agentic AI module utilizes knowledge retrieval on the graph representation of CI dependencies to analyze and prevent the removal of critical dependencies, ensuring zero-loss operational functionality. DAGGER’s knowledge base is built using curated examples that its agentic AI module uses to generate optimized CI. Based on preliminary experiments on production CIs, DAGGER achieves an average size reduction of 35.7% with a 0.2% breakage rate, compared with state-of-the-art baselines.