dive

容器镜像层分析与体积优化

补充说明

dive 检查镜像的每一层、文件增删和浪费空间,帮助定位体积膨胀和构建缓存问题。它分析的是静态镜像内容,不是运行时行为或安全漏洞。

常用示例

dive nginx:latest
dive registry.example.com/app:1.0
dive --ci nginx:latest
dive --json app.tar
dive --source docker-archive app.tar
dive --source podman nginx:latest

.dive-ci:

rules:
  lowestEfficiency: 0.90
  highestWastedBytes: 20MB
  highestUserWastedPercent: 0.15

易错点与排错

相关命令