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

NameTypeDescription
PATHstringReviewed local context path for this example.
-tstringResult image reference.
-fstringAlternate Dockerfile path.
--loadstringLoad single-platform output into the local store.
--networkstringNetworking mode for RUN.

Working Example

Example Snippetdocker
docker build --load --network none -t bm-v07-first-image:lab .
Docker Reference