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.
MIT License
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.
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:
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