It would be especially cool to see multi-platform Docker images being built, specifically for Linux amd64 and arm64 (aarch64).
We'd need to add the QEMU setup step:
- uses: docker/setup-qemu-action@v2
We'd also need to emend the build step to add platforms:
- name: build
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
push: false
tags: naftulikay/fuzzy-datetime:latest
platforms: linux/amd64,linux/arm64
# we include audit info in the binary, do not strip the binary, and skip the audit and tests because these are
# handled in other GitHub Actions workflows.
build-args: |
RUST_AUDITABLE_BINARY=true
RUST_STRIP_BINARY=false
RUST_RUN_AUDIT=false
RUST_RUN_TESTS=false
It would be especially cool to see multi-platform Docker images being built, specifically for Linux amd64 and arm64 (aarch64).
We'd need to add the QEMU setup step:
We'd also need to emend the build step to add platforms:
An example can be found here, documentation of
docker buildx
can be found here, and here is some documentation on the arguments available to the image when building withbuildx
.Essentially, we'd need to take advantage of some of the per-platform variables present:
TARGETPLATFORM
: likelinux/amd64
,linux/arm64
TARGETOS
: presumablylinux
TARGETARCH: presumably
amd64and
arm64`.We could verify this locally by using
buildx
, and we'd need to use conditionals in theDockerfile
:All of these would need to be emended so that when
TARGETARCH
isamd64
, we yieldx86_64
, forarm64
, we yieldaarch64
.