docker builder build

Build an image from a Dockerfile

Usage

docker builder build [OPTIONS] PATH | URL | -

Description

See docker build for more information.

Options

OptionShortDefaultDescription
--add-hostAdd a custom host-to-IP mapping (host:ip)
--build-argSet build-time variables
--cache-fromImages to consider as cache sources
--cgroup-parentOptional parent cgroup for the container
--compressCompress the build context using gzip
--cpu-periodLimit the CPU CFS (Completely Fair Scheduler) period
--cpu-quotaLimit the CPU CFS (Completely Fair Scheduler) quota
--cpu-shares-cCPU shares (relative weight)
--cpuset-cpusCPUs in which to allow execution (0-3, 0,1)
--cpuset-memsMEMs in which to allow execution (0-3, 0,1)
--disable-content-trusttrueSkip image verification
--file-fName of the Dockerfile (Default is PATH/Dockerfile)
--force-rmAlways remove intermediate containers
--iidfileWrite the image ID to the file
--isolationContainer isolation technology
--labelSet metadata for an image
--memory-mMemory limit
--memory-swapSwap limit equal to memory plus swap: -1 to enable unlimited swap
--networkAPI 1.25+ Set the networking mode for the RUN instructions during build
--no-cacheDo not use cache when building the image
--platformAPI 1.38+ Set platform if server is multi-platform capable
--pullAlways attempt to pull a newer version of the image
--quiet-qSuppress the build output and print image ID on success
--rmtrueRemove intermediate containers after a successful build
--security-optSecurity options
--shm-sizeSize of /dev/shm
--squashAPI 1.25+ experimental (daemon) Squash newly built layers into a single new layer
--tag-tName and optionally a tag in the name:tag format
--targetSet the target build stage to build.
--ulimitUlimit options