▸ docker buildx build --help
Usage: docker buildx build [OPTIONS] PATH | URL | -
Start a build
Aliases:
build, b
Options:
--add-host strings Add a custom host-to-IP mapping (host:ip)
--allow strings 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 (eg. user/app:cache, type=local,src=path/to/dir)
--cache-to stringArray Cache export destinations (eg. user/app:cache, type=local,dest=path/to/dir)
-f, --file string Name of the Dockerfile (Default is '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 Set the networking mode for the RUN instructions during build (default "default")
--no-cache Do not use cache when building the image
-o, --output stringArray Output destination (format: type=local,dest=path)
--platform stringArray Set target platform for build
--progress string Set type of progress output (auto, plain, tty). Use plain to show container output (default "auto")
--pull Always attempt to pull a newer version of the image
--push Shorthand for --output=type=registry
--secret stringArray Secret file to expose to the build: id=mysecret,src=/local/secret
--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 in the 'name:tag' format
--target string Set the target build stage to build.
doc
https://matsuand.github.io/docs.docker.jp.onthefly/buildx/working-with-buildx/
コマンド一つでpushまでできる、cross-compilationもあり、嬉しい