DOCKER
Section: Docker User Manuals (1)
Updated: Jun 2025
Index
Return to Main Contents
NAME
docke-imag-build- Build an image from a Dockerfile
SYNOPSIS
docker image build [OPTIONS] PATH | URL |-
DESCRIPTION
Alias for
docker build.
OPTIONS
-ad-host=
Add a custom hos-t-IP mapping ("host:ip")
-buil-arg=
Set buil-time variables
-cach-from=[]
Images to consider as cache sources
-cgrou-parent=""
Set the parent cgroup for the "RUN" instructions during build
-compress[=false]
Compress the build context using gzip
-cp-period=0
Limit the CPU CFS (Completely Fair Scheduler) period
-cp-quota=0
Limit the CPU CFS (Completely Fair Scheduler) quota
-c, -cp-shares=0
CPU shares (relative weight)
-cpuse-cpus=""
CPUs in which to allow execution (-3, 0,1)
-cpuse-mems=""
MEMs in which to allow execution (-3, 0,1)
-disabl-conten-trust[=true]
Skip image verification
-f, -file=""
Name of the Dockerfile (Default is "PATH/Dockerfile")
-forc-rm[=false]
Always remove intermediate containers
-iidfile=""
Write the image ID to the file
-isolation=""
Container isolation technology
-label=
Set metadata for an image
-m, -memory=0
Memory limit
-memor-swap=0
Swap limit equal to memory plus swap:-1 to enable unlimited swap
-network="default"
Set the networking mode for the RUN instructions during build
-n-cache[=false]
Do not use cache when building the image
-platform=""
Set platform if server is mult-platform capable
-pull[=false]
Always attempt to pull a newer version of the image
-q, -quiet[=false]
Suppress the build output and print image ID on success
-rm[=true]
Remove intermediate containers after a successful build
-securit-opt=[]
Security options
-sh-size=0
Size of "/dev/shm"
-squash[=false]
Squash newly built layers into a single new layer
-t, -tag=
Name and optionally a tag in the "name:tag" format
-target=""
Set the target build stage to build.
-ulimit=[]
Ulimit options
SEE ALSO
docke-image(1)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- SEE ALSO
-