docker buildx debug build

June 10, 2026 ยท View on GitHub

Start a build

Aliases

docker build, docker builder build, docker image build, docker buildx b

Options

NameTypeDefaultDescription
--add-hoststringSliceAdd a custom host-to-IP mapping (format: host:ip)
--allowstringArrayAllow extra privileged entitlement (e.g., network.host, security.insecure, device, buildx.local.delete)
--annotationstringArrayAdd annotation to the image
--atteststringArrayAttestation parameters (format: type=sbom,generator=image)
--build-argstringArraySet build-time variables
--build-contextstringArrayAdditional build contexts (e.g., name=path)
--builderstringOverride the configured builder instance
--cache-fromstringArrayExternal cache sources (e.g., user/app:cache, type=local,src=path/to/dir)
--cache-tostringArrayCache export destinations (e.g., user/app:cache, type=local,dest=path/to/dir)
--callstringbuildSet method for evaluating build (check, outline, targets)
--cgroup-parentstringSet the parent cgroup for the RUN instructions during build
--checkboolShorthand for --call=check
-D, --debugboolEnable debug logging
-f, --filestringName of the Dockerfile (default: PATH/Dockerfile)
--iidfilestringWrite the image ID to a file
--labelstringArraySet metadata for an image
--loadboolShorthand for --output=type=docker
--metadata-filestringWrite build result metadata to a file
--networkstringdefaultSet the networking mode for the RUN instructions during build
--no-cacheboolDo not use cache when building the image
--no-cache-filterstringArrayDo not cache specified stages
-o, --outputstringArrayOutput destination (format: type=local,dest=path)
--platformstringArraySet target platform for build
--policystringArrayPolicy configuration (format: filename=path[,filename=path][,reset=true|false][,disabled=true|false][,strict=true|false][,log-level=level])
--progressstringautoSet type of progress output (auto, none, plain, quiet, rawjson, tty). Use plain to show container output
--provenancestringShorthand for --attest=type=provenance
--pullboolAlways attempt to pull all referenced images
--pushboolShorthand for --output=type=registry,unpack=false
-q, --quietboolSuppress the build output and print image ID on success
--resourcestringArrayResource limits for build containers (format: memory=2g, cpu-quota=50000)
--sbomstringShorthand for --attest=type=sbom
--secretstringArraySecret to expose to the build (format: id=mysecret[,src=/local/secret])
--shm-sizebytes0Shared memory size for build containers
--sshstringArraySSH agent socket or keys to expose to the build (format: default|<id>[=<socket>|<key>[,<key>]])
-t, --tagstringArrayImage identifier (format: [registry/]repository[:tag])
--targetstringSet the target build stage to build
--ulimitulimitUlimit options