A CI-friendly Docker image analyzer. Inspect layers, detect waste, find secrets, and enforce best practices — all from the command line, no daemon required.
cargo install slimdockOr via install script:
curl -sSL https://raw.githubusercontent.com/user/slimdock/main/install.sh | sh$ slimdock analyze nginx:latest
Image: nginx:latest
Size: 187 MB (compressed: 64 MB)
Layers: 7
Layer Base Image Size Command
───── ────────────────── ─────── ──────────────────────────────
1 debian:bookworm 74.8 MB apt-get update && apt-get install -y ...
2 (scratch) 2.1 MB COPY nginx.conf /etc/nginx/
3 (scratch) 0.8 MB COPY html/ /usr/share/nginx/html/
...
Waste: 12.4 MB (6.6%)
- Build artifacts left in image: 8.2 MB
- Unused dependencies: 4.2 MB| Command | Description |
|---|---|
analyze |
Full image analysis: layers, sizes, waste breakdown |
waste |
Show only wasted space with cleanup suggestions |
secrets |
Scan for leaked credentials, keys, and tokens |
suggest |
Optimization recommendations for Dockerfile/labels |
check |
CI gate — exit non-zero if issues are found |
All commands support --format json for CI pipeline integration:
slimdock check myapp:latest --format json{
"image": "myapp:latest",
"passed": false,
"issues": [
{"severity": "warn", "message": "Image has 3.2 MB of wasted space"},
{"severity": "error", "message": "Hardcoded API key found in layer 2"}
]
}| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Error (invalid input, etc) |
| 2 | Check failed (issues found) |
| Feature | slimdock | dive |
|---|---|---|
| Daemon required | No | Yes (Docker daemon) |
| CI-friendly | ✅ exit codes + JSON | ❌ TUI-only |
| JSON output | ✅ | ❌ |
| Exit codes for gates | ✅ | ❌ |
| Secret scanning | ✅ | ❌ |
| Multi-platform | ✅ static binaries | Docker image only |
| License | MIT/Apache-2.0 | MIT |
Licensed under either of MIT or Apache 2.0 at your option.