compose_build
Build images for Docker Compose projects without starting services. Control builds with service selection, pull, and cache options.
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 — 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 |