An autonomous dockerization system for multi-service monorepos.
Dockerizer is a tool designed to automatically create and maintain Docker configurations for complex monorepos with multiple services. It scans your repository, identifies services, plans the appropriate Docker configuration, generates Dockerfiles and docker-compose files, and even implements a self-healing system to fix common issues.
- Automatic Service Detection: Identifies Node.js, Rust, Python, and other services in your monorepo
- Smart Configuration: Creates appropriate Dockerfiles for each service type
- Multi-Environment Support: Generates separate configurations for development and production
- Self-Healing: Automatically fixes common Docker issues
- Detailed Documentation: Provides usage instructions and reports
npm install -g dockerizer
To dockerize a repository:
# Navigate to your repository
cd your-monorepo
# Run dockerizer
dockerizer
The tool will guide you through the process with interactive prompts.
Usage: dockerizer [options]
Options:
-t, --target-dir <path> Target directory to dockerize (default: current directory)
-v, --verbose Enable verbose output
-r, --max-retries <number> Maximum number of retries for self-healing (default: 3)
-h, --help Display help information
--version Display version information
This repository includes an example monorepo in the example
directory that you can use to test Dockerizer:
# Navigate to the example
cd example
# Run dockerizer on the example
../bin/dockerizer.js
The example includes:
- A Next.js frontend service
- An Express backend service
- A worker service
- A shared package
- Turborepo configuration
See USAGE.md for a detailed walkthrough of using Dockerizer with this example.
Dockerizer follows a 5-phase process:
- Context Gathering: Scans the repository for configuration files and identifies services
- Planning: Evaluates the gathered information and creates a detailed plan for dockerization
- Code Generation: Creates Dockerfiles, docker-compose files, and supporting configurations
- Execution and Self-Healing: Tests the Docker setup and automatically fixes issues
- Verification: Verifies the final result and provides a detailed report
- Node.js: Next.js, Remix, Express, and generic Node.js services
- Rust: Cargo-based Rust applications
- Python: Django, Flask, FastAPI, and generic Python applications
- Other: Basic support for Go, Java, .NET, PHP, and Ruby
To set up the development environment:
# Clone the repository
git clone https://github.com/yourusername/dockerizer.git
# Install dependencies
cd dockerizer
npm install
# Run the tool
npm start
MIT