Docker CLI
docker build --target
Selects the stage exported by the build. BuildKit may skip unrelated stages. An independent check target needs an enforced workflow. A fresh check can bypass cache; enforce success on the same inputs before promotion.
Formal Syntax & Structure
docker syntaxdocker
docker build --target <stage> [OPTIONS] PATHParameters & Attributes
| Name | Type | Description |
|---|---|---|
| stage | string | Declared target name. |
| PATH | string | Reviewed local context. |
Working Example
Example Snippetdocker
docker build --no-cache --load --network none --target checks -t bm-v10-checks:lab .