Skip to content

Latest commit

 

History

History
39 lines (31 loc) · 2.79 KB

buildx_build.md

File metadata and controls

39 lines (31 loc) · 2.79 KB

docker buildx build

Start a build

Aliases

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

Options

Name Type Default Description
--add-host stringSlice Add a custom host-to-IP mapping (format: host:ip)
--allow stringSlice Allow extra privileged entitlement (e.g., network.host, security.insecure)
--build-arg stringArray Set build-time variables
--builder string Override the configured builder instance
--cache-from stringArray External cache sources (e.g., user/app:cache, type=local,src=path/to/dir)
--cache-to stringArray Cache export destinations (e.g., user/app:cache, type=local,dest=path/to/dir)
--cgroup-parent string Optional parent cgroup for the container
-f, --file string Name of the Dockerfile (default: PATH/Dockerfile)
--iidfile string Write the image ID to the file
--label stringArray Set metadata for an image
--load Shorthand for --output=type=docker
--network string default Set the networking mode for the RUN instructions during build
-o, --output stringArray Output destination (format: type=local,dest=path)
--platform stringArray local Set target platform for build
--push Shorthand for --output=type=registry
-q, --quiet Suppress the build output and print image ID on success
--secret stringArray Secret file to expose to the build (format: id=mysecret,src=/local/secret)
--shm-size string Size of /dev/shm
--ssh stringArray SSH agent socket or keys to expose to the build
format: default|<id>[=<socket>|<key>[,<key>]]
-t, --tag stringArray Name and optionally a tag (format: name:tag)
--target string Set the target build stage to build.
--ulimit string Ulimit options