-
-
Notifications
You must be signed in to change notification settings - Fork 435
Description
I just wanted to say thank you for up-keeping this project. Its been amazing so far!
I was wondering if there was a particular reason behind the decision to have independent Dockerfiles specific to each architecture? To provide some context, I run a k8s cluster with non-homogenous workers (amd64 and arm64). As a result, I have resorted to building a container so that the identical image can be used across all nodes. I've noticed that it's received quite a few downloads in a short period of time and figured it might be a result of your arm and arm64 containers having separate tags and being listed as amd64 architecture in Docker Hub.
In order to facilitate the seamless experience for myself, I've been using docker buildx
to build a container that works across architectures arm/v7
, arm64
, and amd64
. To achieve this, I remove the explicit GOARCH=<arch>
command from the base Dockerfile
and build it with the multi-architecture platform flags in Docker. Here's the explicit command I use:
docker buildx create --name <builder-name>
docker buildx use <builder-name>
docker buildx build --push --no-cache \
--platform linux/arm64,linux/arm/v7,linux/amd64 \
-t <user>/<repo>:$(git describe --tags --abbrev=0) \
-t <user>/<repo>:latest .
I figure this might also help some other folks out that arrive here for the same reason as I. I just wasn't sure if there was a specific intent, or if this might be a simple change to solve the issue for non-homogenous environments. I figure this would also add extensibility to other platforms in the future.