Docker-compose module: Execute

Execute a command in service using Docker Compose.

Example

Similar to exec node in Docker module. Executes a docker command in services defined in docker-compose.yaml configuration file:

space -m docker-compose /exec/ -econtainer=space_container ecmd="/bin/ls"

Exec command in container and use bash tab completion to help you find the container name:

space -m docker-compose /exec/ -ecomposename=space -econtainer[tab][tab]

Exit status code is expected to be 0 on success.

Edit this page