Docker Image Slimmer / Docker镜像瘦身器

Analyze Docker layers, remove bloat, and generate optimized multi-stage Dockerfiles. / 分析Docker层,移除臃肿内容并生成优化的多阶段Dockerfile。

Install

openclaw skills install @kingaiwork/docker-image-slimmer

🐋 Docker Image Slimmer / Docker镜像瘦身器

Analyze Docker layers, remove bloat, and generate optimized multi-stage Dockerfiles. / 分析Docker层,移除臃肿内容并生成优化的多阶段Dockerfile。

🦁 由 KingAI.Work 出品 — 智能进化|vip@kingai.work


Features / 功能特性

• Deep layer analysis identifies 30+ common bloat sources / 深度层分析识别30+常见臃肿源,精准锁定每一层的不必要文件 • Automated multi-stage Dockerfile generation / 自动化多阶段Dockerfile生成,从源头抛弃构建依赖,镜像体积直降80% • One-command slim pipeline with configurable rules / 一键瘦身管道搭配可配置规则,小白也能秒变Docker优化专家 • Intelligent dependency tree pruning / 智能依赖树剪枝,自动剥离测试工具和缓存文件,Pro版支持保留核心运行时 • Pro: Custom base image optimization profiles / Pro版:自定义基础镜像优化方案,适配企业级合规与安全要求 • Pro: Incremental slim for CI/CD workflows / Pro版:CI/CD增量瘦身,每次构建仅处理变更层,速度提升5倍

Quick Start / 快速开始

bash
docker-image-slimmer analyze --image node:18 --output slim-report.json Analyzes the official Node 18 image's layer structure and outputs a detailed bloat report. / 分析官方Node 18镜像的层结构并输出详细的臃肿报告。 

Use Cases / 使用场景

• Monorepo deployment: Reduce a 2GB development image to under 300MB for production / 单体仓库部署:将2GB开发镜像压缩至300MB以内,生产环境启动时间缩短70% • Security compliance: Remove hidden tools like curl and git to shrink attack surface / 安全合规:自动移除curl、git等隐藏工具,满足金融级安全审计要求 • Edge device deployment: Slim a Python ML image from 1.5GB to 450MB for IoT devices / 边缘设备部署:将Python机器学习镜像从1.5GB瘦身至450MB,适应IoT设备存储限制

Plans / 方案对比

FeatureFreePro
Core / 核心功能
Batch / 批量处理
AI / AI 增强
Support / 支持CommunityPriority

• Unlock advanced layer caching and parallel optimization for enterprise-scale projects 解锁企业级项目的高级层缓存与并行优化,团队效率翻番 • Access priority support and custom rules engine for unique infrastructure needs 获取优先支持与自定义规则引擎,适配专属基础设施策略 • Enable incremental slimming in CI/CD pipelines, reducing each build from 5 min to under 1 min 激活CI/CD增量瘦身,每次构建从5分钟压缩至1分钟以内,加速发布节奏\n\n

Published by King AI — kingai.work