refactor: move drivers directory into mcontainer package

- Relocate goose driver to mcontainer/drivers/
- Update ConfigManager to dynamically scan for driver YAML files
- Add support for mc-driver.yaml instead of mai-driver.yaml
- Update Driver model to support init commands and other YAML fields
- Auto-discover drivers at runtime instead of hardcoding them
- Update documentation to reflect new directory structure
This commit is contained in:
2025-03-11 19:37:11 -06:00
parent 6f08e2b274
commit 307eee4fce
10 changed files with 92 additions and 102 deletions

View File

@@ -72,14 +72,16 @@ mc driver build goose
mc driver build goose --push
```
Drivers are defined in the `drivers/` directory, with each subdirectory containing:
Drivers are defined in the `mcontainer/drivers/` directory, with each subdirectory containing:
- `Dockerfile`: Docker image definition
- `entrypoint.sh`: Container entrypoint script
- `mai-init.sh`: Standardized initialization script
- `mai-driver.yaml`: Driver metadata and configuration
- `mc-init.sh`: Standardized initialization script
- `mc-driver.yaml`: Driver metadata and configuration
- `README.md`: Driver documentation
MC automatically discovers and loads driver definitions from the YAML files.
## Development
```bash