DOCKER(1) Docker User Manuals DOCKER(1)

# [NAME](#NAME)

docker-image-build - Build an image from a Dockerfile

# [SYNOPSIS](#SYNOPSIS)

**docker image build \[OPTIONS] PATH | URL | -**

# [DESCRIPTION](#DESCRIPTION)

Alias for **docker build**.

# [OPTIONS](#OPTIONS)

**--add-host**= Add a custom host-to-IP mapping ("host:ip")

**--build-arg**= Set build-time variables

**--cache-from**=\[] Images to consider as cache sources

**--cgroup-parent**="" Set the parent cgroup for the "RUN" instructions during build

**--compress**\[=false] Compress the build context using gzip

**--cpu-period**=0 Limit the CPU CFS (Completely Fair Scheduler) period

**--cpu-quota**=0 Limit the CPU CFS (Completely Fair Scheduler) quota

**-c**, **--cpu-shares**=0 CPU shares (relative weight)

**--cpuset-cpus**="" CPUs in which to allow execution (0-3, 0,1)

**--cpuset-mems**="" MEMs in which to allow execution (0-3, 0,1)

**-f**, **--file**="" Name of the Dockerfile (Default is "PATH/Dockerfile")

**--force-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

**--memory-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

**--no-cache**\[=false] Do not use cache when building the image

**--platform**="" Set platform if server is multi-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

**--security-opt**=\[] Security options

**--shm-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](#SEE_ALSO)

[**docker-image(1)**](/man/enterprise-packages/docker-cli-fips/docker-image.1)

Oct 2026 Docker Community

---

Document: docker-image-build(1) from docker-cli-fips 29.9.2-r2 (Chainguard OS)
Source: https://github.com/docker/cli
