docker buildx build <string>

The buildx build command starts a build using BuildKit. This command is similar to the UI of docker build command and takes the same flags and arguments

Arguments

NameDescription
string

Options

NameDescription
--add-host <string>Add a custom host-to-IP mapping
--allow <string>Allow extra privileged entitlement
--build-arg <string>Set build-time variables
--build-context <string>Additional build contexts
--cache-from <string>External cache sources
--cache-to <string>Cache export destinations
--cgroup-parent <string>Optional parent cgroup for the container
--compress <string>Compress the build context using gzip
--cpu-period <string>Limit the CPU CFS (Completely Fair Scheduler) period
--cpu-quota <string>Limit the CPU CFS (Completely Fair Scheduler) quota
--cpu-shares, -c <string>CPU shares (relative weight)
--cpuset-cpus <string>CPUs in which to allow execution (0-3, 0,1)
--cpuset-mems <string>MEMs in which to allow execution (0-3, 0,1)
--file, -f <string>Name of the Dockerfile
--force-rm <string>Always remove intermediate containers
--iidfile <string>Write the image ID to the file
--invoke <string>Invoke a command after the build [experimental]
--isolation <string>Container isolation technology
--label <string>Set metadata for an image
--load <string>Shorthand for --output=type=docker
--memory, -m <string>Memory limit
--memory-swap <string>Swap limit equal to memory plus swap: -1 to enable unlimited swap
--metadata-file <string>Write build result metadata to the file
--network <string>Set the networking mode for the RUN instructions during build
--no-cache <string>Do not use cache when building the image
--no-cache-filter <string>Do not cache specified stages
--output, -o <string>Output destination (format: type=local,dest=path)
--platform <string>Set target platform for build
--print <string>Print result of information request (e.g., outline, targets) [experimental]
--progress <progress>Set type of progress output (auto, plain, tty). Use plain to show container output
--pull <string>Always attempt to pull all referenced images
--push <string>Shorthand for --output=type=registry
--quiet, -q <string>Suppress the build output and print image ID on success
--rm <container>Remove intermediate containers after a successful build
--secret <string>Secret to expose to the build (format: id=mysecret[,src=/local/secret])
--security-opt <string>Security options
--shm-size <string>Size of /dev/shm
--squash <string>Squash newly built layers into a single new layer
--ssh <string>SSH agent socket or keys to expose to the build (format: default|&lt;id&gt;[=&lt;socket&gt;|&lt;key&gt;[,&lt;key&gt;]])
--tag, -t <string>Name and optionally a tag (format: name:tag)
--target <string>Set the target build stage to build
--ulimit <string>Ulimit options