m3db / m3

M3 monorepo - Distributed TSDB, Aggregator and Query Engine, Prometheus Sidecar, Graphite Compatible, Metrics Platform
https://m3db.io/
Apache License 2.0
4.77k stars 453 forks source link

[all] Build cross platform docker images and build linux amd64+arm64 #4194

Open robskillington opened 1 year ago

robskillington commented 1 year ago

What this PR does / why we need it:

This adds ability to build cross platform docker images for both amd64 and arm64. e.g. Running M3 on AWS Graviton instances and/or Apple M1 chips.

So far have been using this for one off builds by pushing this branch with a trailing "/build-docker" in the commit message, but opening this for longer term merging. Most of the build change comes from the .ci/build.sh script, it's possible to branch from this branch and comment out the most of the CI jobs in .buildkite/pipeline.yml add "/build-docker" to the commit messages and push it to achieve a multi-arch build of any arbitrary commit/branch/tag from the repo.

Special notes for your reviewer:

Does this PR introduce a user-facing and/or backwards incompatible change?:

NONE

Does this PR require updating code package or user-facing documentation?:

NONE