Docker Compose
docker compose build
Build images for configured build services. Explicit image assigns the resulting tag. Check builder and context, base digest, offline prerequisites and output availability before running. Check effective builder endpoint and build success before using the local tag.
Formal Syntax & Structure
docker syntaxdocker
docker compose build [OPTIONS] [SERVICE...]Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| SERVICE | string | Optional selected build service |
Working Example
Example Snippetdocker
docker compose -f compose.yaml -p bm-v12-build-image build worker