Skip to content

Commit b0cfd14

Browse files
committed
docs(development): describe the multi-arch default of make image
cozystack now builds package images for linux/amd64 and linux/arm64 unless PLATFORM is set, which needs a builder that supports both. LOAD=1 builds for the host only, and talos and testing always build amd64. The development page showed a two-platform builder without saying why it is needed or how to build a single architecture. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <[email protected]>
1 parent 72933a8 commit b0cfd14

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎content/en/docs/next/development.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,10 @@ docker buildx create \
301301

302302
Alternatively, omit the --driver* options to set up the build environment in an local Docker environment.
303303

304+
`make image` builds for `linux/amd64` and `linux/arm64` by default, so the builder must support both platforms, as the one above does. Pass `BUILDER=<name>` to pick it. Go builders compile natively on the build platform, so only package installs in the image run under emulation; a local Docker builder needs QEMU (or Rosetta on Apple Silicon) registered for the other architecture. Set `PLATFORM` to build something else, for example `PLATFORM=linux/amd64` for a single architecture.
305+
306+
`LOAD=1 PUSH=0` loads the image into the local Docker image store instead of pushing it, and builds for the host architecture only, because the classic image store cannot load a multi-platform image. The `talos` and `testing` packages always build `linux/amd64`, since what they produce only runs there.
307+
304308
### Packages management
305309

306310
Each application includes a Makefile to simplify the development process. We follow this logic for every package:

0 commit comments

Comments
 (0)