🚢 Manage multiple containers and multiple tasks at once
Convoy is a Go-based CLI tool for orchestrating multiple Alpine Linux containers via Docker. It uses gRPC for communication, supervisord for process management, and round-robin load balancing to distribute tasks evenly.
- Container Orchestration: Create, manage, and stop multiple Alpine Linux containers.
- Command Execution: Send commands to individual containers or all at once via gRPC over TCP.
- Load Balancing: Evenly distribute tasks across containers using a round-robin algorithm.
- Individual Management: Inspect, view logs, check stats (CPU/memory), restart, and access interactive shells on containers.
- Process Management: Supervisord handles gRPC servers in containers for reliability.
- CLI: Built with Cobra; alias
cvyfor convenience.
Prerequisites: Go 1.21+, Docker, GitHub CLI (for remote setup).
go install ./cmd/convoyconvoy --help
# or
cvy --helpconvoy start <name>– Creates (if needed) and starts a new container registered under the provided CLI name. Running the same name again reuses the existing container instead of spawning a duplicate.convoy stop <name|id>– Stops and removes the container identified by name or ID. Use-a/--allto stop and remove every tracked container.convoy list– Lists all containers managed by Convoy along with their CLI name, image, and agent endpoint.convoy config- Show, validate or initialize Convoy configuration.convoy health- Check if Convoy is running and healthy. Use-a/--allto see the health status of every tracked container.convoy exec <name|id> <command>– Execute a non-interactive command inside a container via the gRPC agent.convoy shell <name|id>– Open an interactive shell session in a container with full PTY support.convoy copy <src> <dest>– Copy files to/from containers using<name>:<path>syntax.
The shell command provides an interactive terminal session inside a container with full PTY (pseudo-terminal) support:
# Open default shell in container
convoy shell my-container
# Run a specific shell or command
convoy shell my-container -- /bin/bash
# With environment variables and working directory
convoy shell my-container -w /app -e FOO=bar -e DEBUG=1
# With session timeout
convoy shell my-container --timeout 30mFeatures:
- Full terminal emulation (colors, cursor control, line editing)
- Window resize support (automatically adjusts when you resize your terminal)
- Ctrl+C forwarding to the remote process
- Configurable session timeout
This project uses just as a command runner. Install it with:
cargo install justRun just or just --list to see all available recipes:
just compile- Build the Go binaryjust test- Run all testsjust lint- Run the linterjust clean- Clean build artifactsjust build-image- Build the Docker image
Convoy uses a custom Alpine Linux image with a pre-configured supervisor process to manage gRPC servers. To build the image, run:
just build-imageBy default, the image is tagged as convoy:latest. The image currently only containers opencode and the packages to run it.
However, the image being used can be changed in the configuration file.
Contributions welcome! See LICENSE for details.