Docker CLI
docker build
Build an image from a recipe and inputs. Use the local fixture directory, an approved offline builder and a reviewed preloaded base. -t names the result; --load exports one platform into the local image store; --network none limits RUN networking only. No registry push. Stop if build fails; verify tag ownership and remove only the lab image when finished. Verify the effective local daemon and builder, use an approved private synthetic context, and record the resulting image ID. The RUN network flag does not control every builder network request.
Formal Syntax & Structure
docker syntaxdocker
docker build [OPTIONS] PATH | URL | -Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| PATH | string | Reviewed local context path for this example. |
| -t | string | Result image reference. |
| -f | string | Alternate Dockerfile path. |
| --load | string | Load single-platform output into the local store. |
| --network | string | Networking mode for RUN. |
Working Example
Example Snippetdocker
docker build --load --network none -t bm-v07-first-image:lab .