I've been juggling multiple Docker Compose projects across various directories, and it's become quite tedious. To simplify this, I created a small Bash wrapper that allows me to manage these projects by name and execute `docker compose` commands from anywhere.
For instance, I can simply type commands like `dcompose media`, `dlogs website`, or `ddown backup`.
Here's what the script does:
* It automatically discovers Compose projects in commonly used base directories.
* It maintains a straightforward registry file for manually added project paths.
* It's entirely written in pure Bash.
* It works seamlessly over SSH and on servers.
* The error messages and output are designed to be readable in a terminal.
If you're interested in checking out the code, you can find it here: [GitHub Repo](https://github.com/kyanjeuring/dstack). I'd love to hear your feedback on it!
3 Answers
I think this is pretty neat! Just a heads up, though, you mentioned it's "pure Bash" but it uses `awk`, which isn't actually Bash. Also, the `curl | bash` lines can be risky—some people are really against that method for security reasons. Just something to keep in mind! 🤔
This looks awesome! I actually have a similar problem managing different environments on the same server. Thanks for sharing it! It’s really helpful to see a solution like this in action.
Glad you found it useful! That was exactly my motivation for creating it—managing unrelated environments in one place.
Portainer has been a game changer for me when it comes to managing Docker stuff effectively. Have you tried it?

Good point! I suppose I should’ve said it's "Bash-based." The `curl | bash` is more about convenience, but I totally get the security concerns. That's why I made manual installation an option.