Draft: ci: enable multiplatform builds with docker buildx

Closed pini requested to merge (removed):pini-docker-multiplatform into master
  • Build from the Dockerfile and copy the artifacts from the resulting image

  • Use cross-compilation at build stage when building for a foreign architecture

  • Use docker buildx build ... in CI to enable multiplatform builds. If buildx is not installed use: DOCKER_BUILDKIT=1 docker build ...

  • Gilab runner must expose tag 'multiplatform' which means it has native amd64 arch + emulated arm64 support: https://github.com/tonistiigi/binfmt/tree/deploy/v7.0.0-28#installing-emulators

      $ docker run --privileged --rm tonistiigi/binfmt --install arm64
  • Use lto = thin for release profile

Edited by pini

Merge request reports