docker-actions is a lightweight CLI tool to manage multiple Docker Compose services in a directory tree using a single command.
It is designed for self-hosted servers and homelabs where many independent services are organized into folders and need to be started, stopped, or inspected cleanly and consistently.
The tool focuses on clarity, safety, and clean terminal output, while preserving Docker Compose’s native colored UI.
- Recursively discovers Docker Compose services
- Supports
compose.ymlanddocker-compose.yml - Stops traversal at service boundaries (prevents dev/test leakage)
- Preserves Docker Compose’s colored, dynamic output
- Clean separation between services in terminal output
- Prints compose file location per service
- Final summary of succeeded and failed services
- Supports any
docker composecommand - Dry-run mode
- Parallel execution
- Structured JSON output for automation
- Safe absolute path resolution
- directories having .docker-actions-ignore will be ignored
- Works when installed as a global command
chmod +x /path/to/docker-actions.sh
sudo ln -s /path/to/docker-actions.sh /usr/local/bin/docker-actionsdocker-actions <directory> <docker compose arguments> [options]docker-actions . up -d
docker-actions ./apps down
docker-actions ./apps restart
docker-actions ./apps pull
docker-actions ./apps status
docker-actions ./apps up -d --dry-run
docker-actions ./apps up -d --parallel
docker-actions ./apps up -d --jsonThe <directory> argument may be:
.(current working directory)- A relative path
- An absolute path
All paths are resolved internally to absolute paths.
The script refuses to operate on / for safety.
Any valid docker compose subcommand is supported, including:
updownrestartpullpslogsconfig
docker-actions ./apps statusIs equivalent to:
docker compose ps-
A directory is treated as a service root if it contains:
compose.ymlordocker-compose.yml
-
Once a service root is found:
- Subdirectories are not traversed
-
This prevents accidentally running nested dev/test compose files
To skip a directory and everything under it, create a file:
.docker-actions-ignore
Typical use cases:
- Deprecated services
- Archived stacks
- Experimental folders
- Trash directories
For each service, the tool prints:
- Service name
- Location of the compose file
- Docker Compose’s native colored output
- Final status (
SUCCESSorFAILED) - Execution time
Docker Compose fully controls the terminal while it runs, preventing overlapping or broken output.
At the end of execution, a summary is printed:
============================================================
SUMMARY
------------------------------------------------------------
Successful (3):
✓ immich
✓ uptime-kuma
✓ linkding
Failed (1):
✗ any-sync-dockercompose
============================================================
This gives an immediate overview without scrolling back through logs.
Preview actions without executing anything:
docker-actions ./apps up -d --dry-runNo containers are started, stopped, or modified.
Run services concurrently:
docker-actions ./apps up -d --parallelUseful for large stacks with independent services.
Enable structured, machine-readable output:
docker-actions ./apps up -d --json{
"target": "/home/docker/sisyphus/apps",
"command": "docker compose up -d",
"results": [
{
"service": "immich",
"status": "success",
"duration": 4.12
},
{
"service": "any-sync-dockercompose",
"status": "failed",
"duration": 5.23
}
]
}When --json is enabled:
- Human-readable output is suppressed
- Output is suitable for scripts, CI, or monitoring tools
0— all services succeeded1— one or more services failed>1— invalid usage or fatal error
This tool intentionally avoids:
- Health-check heuristics
- Dependency graphs
- YAML configuration layers
- Kubernetes-style abstractions
Instead, it aims to be:
- Explicit
- Predictable
- Easy to reason about
- Pleasant to use in a terminal
It behaves like a sharp Unix utility, not a platform.
- Self-hosted servers
- Homelabs
- Single-node Docker environments
- Internal infrastructure tooling
If you need clustering, autoscaling, or orchestration across nodes, this tool is intentionally not designed for that.
- Bash
- Docker
- Docker Compose v2 (
docker compose) realpathbc
This project is open-source and available under the MIT License.