fix: Update README and script to include all valid Docker Compose file extensions

This commit is contained in:
Peter Wood
2025-12-08 00:49:49 +00:00
parent c5760f6dad
commit a478739f55
2 changed files with 6 additions and 3 deletions

View File

@@ -14,7 +14,7 @@ A Python command-line application to manage Docker containers defined in subdire
- Python 3 - Python 3
- Docker and Docker Compose (plugin) installed. - Docker and Docker Compose (plugin) installed.
- A `~/docker/` directory containing subdirectories for each of your projects. - A `~/docker/` directory containing subdirectories for each of your projects.
- Each project subdirectory must contain a `docker-compose.yml` or `compose.yml` file. - Each project subdirectory must contain a `docker-compose.yml`, `docker-compose.yaml`, `compose.yml`, or `compose.yaml` file.
## Installation ## Installation

View File

@@ -3,7 +3,7 @@
Docker Manager Application Docker Manager Application
This script manages Docker containers defined in subdirectories of `~/docker/`. This script manages Docker containers defined in subdirectories of `~/docker/`.
Each subdirectory is treated as a project and must contain a `docker-compose.yml` or `compose.yml`. Each subdirectory is treated as a project and must contain a `docker-compose.yml`, `docker-compose.yaml`, `compose.yml`, or `compose.yaml`.
Usage Examples: Usage Examples:
1. List all running containers: 1. List all running containers:
@@ -50,7 +50,10 @@ def get_projects():
for item in DOCKER_ROOT.iterdir(): for item in DOCKER_ROOT.iterdir():
if item.is_dir(): if item.is_dir():
if (item / "docker-compose.yml").exists() or (item / "compose.yml").exists(): if (item / "docker-compose.yml").exists() or \
(item / "docker-compose.yaml").exists() or \
(item / "compose.yml").exists() or \
(item / "compose.yaml").exists():
projects[item.name] = item projects[item.name] = item
return projects return projects