⭐ If you find this project useful, please consider giving it a star to show your support!
DClean is a powerful tool for analyzing Docker images and Dockerfiles. DClean leverages Trivy for comprehensive vulnerability scanning and provides actionable recommendations to optimize your Dockerfile instructions, helping you create leaner, faster, and more secure containers.
- Docker installed on your system
- Python 3.10 or higher
- pip (Python package manager)
pip install mist.dcleangit clone https://github.com/mist941/dclean.gitcd dcleanpip install -e .dclean versionYou should see the following output:
dclean version 0.1.2dclean analyze path/to/DockerfileSave analysis results to a file:
dclean analyze path/to/Dockerfile --output path/to/output.txtPerform deep analysis (includes vulnerability scanning):
dclean analyze path/to/Dockerfile --deepDeep analysis with colored output in terminal:
dclean analyze dockerfiles/Dockerfile --deepSave results to a file:
dclean analyze dockerfiles/Dockerfile --deep --output examples/file_output.txtThe DClean project is organized as follows:
dclean/
├── main.py # CLI entry point
├── analyze # Analyze Dockerfiles and Docker images
├── utils # Utility functions
├── api # API for analyzing Docker images
└── tests # TestsDClean is built using the following technologies and tools:
- Python 3.10+: Core programming language
- Click: Command-line interface creation
- Docker SDK for Python: Interacting with Docker API
- Trivy: Vulnerability scanning for container images
- pytest: Testing framework
- flake8: Linting
- Ivan Statkevich - Initial work - mist941
This project is maintained by Ivan Statkevich. Feel free to reach out with questions or feedback.
🤝 Contributions are welcome! Feel free to open issues and submit pull requests.
- Fork the repository on GitHub
- Clone your fork to your local machine
- Create a new branch from the
devbranch for your feature or bugfix - Make your changes and commit them with descriptive messages
- Push your branch to your GitHub fork
- Open a pull request from your branch to the
devbranch of the main repository
If you find a bug or have a feature request, please open an issue on GitHub with:
- A clear, descriptive title
- A detailed description of the issue or feature
- Steps to reproduce (for bugs)
- Any relevant logs or screenshots
