DevDock is a Python library and CLI tool for managing development containers. It supports Docker images and Docker Compose configurations, allowing for easy container creation, volume management, and service orchestration.
- Create and manage Docker containers with multiple volume mappings.
- Create and manage Docker Compose configurations with service dependencies.
- Activate specific services along with their dependencies.
- Run commands and open shells inside specific services.
Install DevDock using pip:
pip install devdock
devdock mkdevcontainer --image python:3.9 --name my-python-container --volumes /host/path1:/container/path1,/host/path2:/container/path2
devdock mkdevcontainer -f docker-compose.yaml --name my-compose --volume-mappings web:/host/path1:/var/www,web:/host/path2:/var/log/nginx,redis:/host/redis1:/data,db:/host/db1:/var/lib/postgresql/data
devdock workon my-compose
devdock workon my-compose --services web
devdock rmdev my-compose
devdock stop my-python-container
devdock remove my-python-container
devdock run my-compose --service web "echo Hello, World!"
devdock shell my-compose --service web
Here's a sample docker-compose.yaml
file for reference:
version: '3.8'
services:
web:
image: nginx:latest
depends_on:
- redis
volumes:
- web_data:/var/www
- web_logs:/var/log/nginx
redis:
image: redis:latest
depends_on:
- db
volumes:
- redis_data:/data
db:
image: postgres:latest
volumes:
- db_data:/var/lib/postgresql/data
volumes:
web_data:
web_logs:
redis_data:
db_data:
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Write your code and tests.
- Run the tests to make sure everything is working.
- Submit a pull request with a clear description of your changes.
This project is licensed under the MIT License. See the LICENSE file for more details.
If you have any questions or need further assistance, please feel free to reach out to the project maintainer:
Ali Tavallaie
- Email: [email protected]