Docker Analyzer CLI
Finally a lightweight tool to inspect and compare Docker images instantly, focusing on layer analysis.
Overview
Docker Analyzer CLI is a Python-based command-line interface designed to analyze and compare Docker images. It provides quick insights into image layers, size optimizations, and differences, making it an essential tool for developers and DevOps engineers.
Features
- Layer Analysis: Inspect Docker image layers to identify redundancies or inefficiencies.
- Image Comparison: Compare two images to find shared, duplicated, or non-shared layers.
- CLI Interface: A powerful and flexible command-line interface.
- Web GUI Integration: Optionally launch a web-based interface for interactive analysis.
- Custom Configuration: Configure temporary directories, logging, and output formats.
Installation
Via PIP
pip install docker_analyzer
Via Poetry
poetry add docker_analyzer
CLI Usage
Getting Help
To view all available commands and options:
docker_analyzer --help
Common Commands
Get Temporary Directory
Displays the temporary directory used for file storage:
docker_analyzer get-temp-dir
List Docker Images
Lists all Docker images available on the system:
docker_analyzer list-images
Launch Web GUI
Starts the web-based graphical interface:
docker_analyzer web-gui
Navigate to http://localhost:5002 in your browser to use the GUI.
Comparison Examples
Compare Shared Layers
Identify layers that are shared between two images:
docker_analyzer compare shared-layers python:3.9-slim python:3.9
Compare Duplicated Layers
Find duplicated layers within an image or across two images:
docker_analyzer compare duplicated-layers python:3.9-slim python:3.9
Compare Non-Shared Layers
Identify layers unique to each image:
docker_analyzer compare non-shared-layers python:3.9-slim python:3.9
Compare Total Sizes
Compare the total sizes of two images:
docker_analyzer compare total-sizes python:3.9-slim python:3.9
Development
Running Tests
Run all tests using pytest:
poetry run pytest
Code Style
The project adheres to PEP 8. Check code formatting using black:
poetry run black .
Contributing
We welcome contributions! To contribute:
- Fork the repository.
- Create a feature branch.
- Submit a pull request with a detailed description.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Metadata
Release files for docker-analyzer 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| docker_analyzer-0.1.3.tar.gz | 36.8 kB | Without provenance | Details for docker_analyzer-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| docker_analyzer-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for docker_analyzer-0.1.3-py3-none-any.whl |
Total release size: 82.2 kB
Release files / docker_analyzer-0.1.3.tar.gz
| Download URL | docker_analyzer-0.1.3.tar.gz |
|---|---|
| Size | 36.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2315d08a6171b03a2d78556ba46165c0456685bd337db0a63e957cdd931f8f56
|
|
BLAKE2b-256 checksum How to use checksums |
2733f919fd1bc50ed40978a92a1bc6cddc5fdd5a2a2f32bd160e6b03d3e0e878
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.12
|
Release files / docker_analyzer-0.1.3-py3-none-any.whl
| Download URL | docker_analyzer-0.1.3-py3-none-any.whl |
|---|---|
| Size | 45.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c0006b8410b6d4dfdc290ff2556657e75e68998e1072907dfa884aea6c67778
|
|
BLAKE2b-256 checksum How to use checksums |
e91d6368741a8acfb6f15d47446a847006b6c38dc1bbd8f6ffacae30e5f55d19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.12
|
Security for docker-analyzer 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.