A powerful Podman Desktop extension for deeply inspecting container images, exploring layer structure, analyzing file systems, and measuring space efficiency - inspired by dive.
Explore each image layer in detail and understand exactly what changed at each step of your image build.
Get a comprehensive efficiency score and identify wasted space in your container images. Discover:
- Total image size
- Wasted space from deleted or modified files
- Efficiency score (0-100%)
- Duplicated files across layers
Track file changes across layers:
- Files added in each layer
- Files modified from previous layers
- Files removed (but still consuming space)
- Size contribution per layer
Receive actionable suggestions to optimize your images:
- Combine layers to reduce overhead
- Clean up temporary files in the same layer
- Use multi-stage builds for smaller images
- Identify large layers that need attention
Beautiful, responsive web-based interface with:
- Expandable layer details
- Color-coded efficiency indicators
- Real-time metrics visualization
- Easy-to-read file statistics
Coming soon - Screenshots of the extension in action
-
Clone the repository:
git clone https://github.com/ash-thakur-rh/inspect.git cd inspect -
Install dependencies and build:
npm install npm run build
-
Install in Podman Desktop:
- Open Podman Desktop
- Go to Settings β Extensions
- Click "Install extension from folder"
- Select the
inspectdirectory - The extension will be loaded and activated
Download the latest release and install directly in Podman Desktop.
- Open Podman Desktop
- Navigate to the Images view
- Find the image you want to analyze
- Click the "Inspect Layers" menu item for that image
- Wait for the analysis to complete
- Explore the results in the webview panel
- 90-100%: π’ Excellent - well-optimized image
- 80-89%: π‘ Good - minor optimizations possible
- 60-79%: π Fair - consider optimization
- <60%: π΄ Poor - significant optimization needed
Click on any layer to see:
- Number of files added, modified, and removed
- Layer size and wasted space
- The command that created the layer
- Creation timestamp
The extension provides specific suggestions based on your image structure:
- Combine multiple RUN commands
- Remove package manager caches
- Use multi-stage builds
- Clean up temporary files
- Node.js 20 or higher
- npm 9 or higher
- Podman Desktop installed
# Install dependencies
npm install
# Build the extension
npm run build
# Watch mode for development (auto-rebuild on changes)
npm run watch
# Run tests
npm test
# Run tests in watch mode
npm run test:watch
# Check code formatting
npm run format:check
# Fix code formatting
npm run format:fixinspect/
βββ src/
β βββ extension.ts # Main entry point
β βββ types/ # TypeScript interfaces
β βββ analyzers/ # Image and layer analysis
β β βββ image-analyzer.ts
β β βββ layer-analyzer.ts
β β βββ filesystem-parser.ts
β β βββ efficiency-calculator.ts
β βββ ui/ # UI components
β β βββ inspect-panel.ts
β βββ utils/ # Utility functions
βββ dist/ # Compiled output
βββ package.json # Extension manifest
βββ README.md
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
See DEVELOPMENT.md for detailed architecture and upcoming features.
| Feature | Inspect | dive |
|---|---|---|
| Podman Desktop Integration | β | β |
| Web-based UI | β | β (Terminal UI) |
| Layer Analysis | β | β |
| File System Browser | β | β |
| Efficiency Metrics | β | β |
| CI Integration | π§ Planned | β |
| Interactive Layer Diff | π§ Planned | β |
Legend: β Implemented | π§ Planned | β Not Available
See examples/EXAMPLES.md for detailed usage examples and optimization strategies.
Before optimization:
FROM ubuntu:22.04
RUN apt-get update
RUN apt-get install -y python3
RUN apt-get install -y python3-pip
COPY app.py /app/Efficiency: 65%, Wasted: 180MB
After optimization:
FROM ubuntu:22.04
RUN apt-get update && \
apt-get install -y python3 python3-pip && \
rm -rf /var/lib/apt/lists/*
COPY app.py /app/Efficiency: 92%, Wasted: 12MB
- [β]: MVP features
- [β] Real tar archive extraction from layers
- [β] Interactive file tree browser
- Layer diff visualization
- Export reports (JSON, CSV, HTML)
- Caching for analyzed layers
- Comparison between multiple images
- Historical analysis tracking
- Performance optimizations
- CI integration mode
- Custom efficiency rules
- Plugin system for analyzers
- Multi-platform support
- Ensure you've built the extension:
npm run build - Check that
dist/extension.jsexists - Look for errors in Podman Desktop's developer console
- Verify the image exists:
podman images - Check Podman Desktop logs for errors
- Ensure you have permission to access the image
- Check browser console in the webview
- Ensure webview has
enableScripts: true - Try reloading the extension
Q: Does this work with Docker images? A: Yes! It works with any OCI-compliant container image.
Q: Can I use this in CI/CD pipelines? A: Not yet, but CLI support is planned for future releases.
Q: How accurate are the efficiency scores? A: The scores are based on layer size analysis and file change tracking. Actual optimization results may vary.
Q: Does this modify my images? A: No, the extension is read-only and only analyzes existing images.
Apache License 2.0 - see LICENSE for details
- Inspired by dive by Alex Goodman
- Built for Podman Desktop
- Thanks to the Podman Desktop team for the extension API
- π Report Issues
- π¬ Discussions
- π Documentation