Run Docker Compose Command
docker_compose_commandRun any Docker Compose command on a specific compose file to manage containers, view logs, restart services, or execute commands.
Instructions
Execute any docker compose command for a specific compose file.
This tool allows running arbitrary docker compose commands like:
ps: List containers
logs: View container logs
restart: Restart services
stop/start: Stop or start services
exec: Execute commands in running containers
Args:
compose_file (string): Absolute path to the docker-compose.yml file
command (string): Docker compose command to run (everything after 'docker compose -f file.yml')
Returns: The stdout and stderr output from the docker compose command
Examples:
Use when: "Show me the logs for my docker containers"
Use when: "List running docker compose services"
Use when: "Restart the web service"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | Docker compose command to run (e.g., 'ps', 'logs', 'restart') | |
| compose_file | Yes | Absolute path to the docker-compose.yml file |