github.com/rawahars/moby@v24.0.4+incompatible/docs/contributing/ctn-build.md (about)

     1  The `Dockerfile` supports building and cross compiling docker daemon and extra
     2  tools using [Docker Buildx](https://github.com/docker/buildx) and [BuildKit](https://github.com/moby/buildkit).
     3  A [bake definition](https://docs.docker.com/build/bake/file-definition/) named
     4  `docker-bake.hcl` is in place to ease the build process:
     5  
     6  ```shell
     7  # build binaries for the current host platform
     8  # output to ./bundles/binary-daemon by default
     9  docker buildx bake
    10  # or
    11  docker buildx bake binary
    12  
    13  # build binaries for the current host platform
    14  # output to ./bin
    15  DESTDIR=./bin docker buildx bake
    16  
    17  # build dynamically linked binaries
    18  # output to ./bundles/dynbinary-daemon by default
    19  DOCKER_STATIC=0 docker buildx bake
    20  # or
    21  docker buildx bake dynbinary
    22  
    23  # build binaries for all supported platforms
    24  docker buildx bake binary-cross
    25  
    26  # build binaries for a specific platform
    27  docker buildx bake --set *.platform=linux/arm64
    28  ```