CmdID / docker / docker builder
docker builder build
Build an image from a Dockerfile Docker CLI reference
29 options
Also docker build, docker image build
Its page in the Docker CLI reference
Options
Show its 29 options
--add-hostAdd a custom host-to-IP mapping (host:ip)--build-argSet build-time variables--cache-fromImages to consider as cache sources--cgroup-parentSet the parent cgroup for the RUN instructions during build--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)--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--networkSet the networking mode for the RUN instructions during build--no-cacheDo not use cache when building the image--platformSet 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--rmRemove intermediate containers after a successful build--security-optSecurity options--shm-sizeSize of /dev/shm--squashSquash 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