compose_build
Build Docker Compose project images without starting containers. Specify services, disable cache, or force pull for updated base images.
Instructions
Build images for a compose project.
Builds the images declared by the project's build: sections without starting anything -
compose_up(build=True) builds and starts in one step.
Does not raise on a non-zero CLI exit (a missing compose plugin or a timeout still raises) - inspect
returncode/stderr in the result.
Args:
project_dir: Dir with the compose file (default: server cwd; copied to the target host if no local plugin)
files: Explicit compose file paths (repeatable, -f)
project_name: Compose project name override
services: Specific services to build (default: all)
pull: Always attempt to pull a newer base image
no_cache: Do not use cache when building
timeout_seconds: Subprocess timeout (default 1800s)
Returns: dict: {"returncode": int, "stdout": str, "stderr": str, "truncated": bool}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pull | No | ||
| files | No | ||
| no_cache | No | ||
| services | No | ||
| project_dir | No | ||
| project_name | No | ||
| timeout_seconds | No |