Seneca-CDOT / telescope

A tool for tracking blogs in orbit around Seneca's open source involvement
https://telescope.cdot.systems
BSD 2-Clause "Simplified" License
96 stars 189 forks source link

Support multiple platforms/architectures with our Docker Images #3386

Open humphd opened 2 years ago

humphd commented 2 years ago

A few of us are on ARM64 (M1 Macs, etc), and our Docker images are only being built for linux/amd64 (i.e., x86_64). Docker supports passing/using a --platform=... flag:

FROM --platform=${BUILDPLATFORM} nginx-alpine
...

And then when you build:

$ docker build --platform=linux/arm/v7,linux/arm64/v8,linux/amd64 .

The Github Action for building Docker images supports including a platform key too`.

Let's support more platforms for our devs. I want linux/arm64v8 for my M1 Mac, in addition to linux/amd64.

See https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/

humphd commented 2 years ago

NOTE: on the builder we'll need QEMU installed in order to cross-compile.