multi-arch builds
janrito opened this issue · 3 comments
Is your feature request related to a problem?
My dev machine is an ARM mac, the cluster runs on amd64. Currently I can't build the images locally if I want them to work on the cluster.
Which solution do you suggest?
Buildkit supports multi-arch images https://docs.docker.com/build/building/multi-platform/#multiple-native-nodes
Which alternative solutions exist?
Not aware of any
Additional context
I'd be really nice to just be able to:
images:
test-application-image:
image: acct.dkr.ecr.region.amazonaws.com/test-application-image
dockerfile: app/Dockerfile
context: app/
buildKit:
args: [--platform, 'linux/amd64,linux/arm64']
+1
+1
Did not expect to hit this issue when integrating multi arch builds in our system.
I don't understand where the issue is coming from. When specifying
"--platform linux/amd64,linux/arm64" in buildKit.inCluster.createArgs and buildKit.args it complains about
ERROR: unknown flag: --platform linux/amd64,linux/arm64
But if I copy paste the command it prints it works and I cannot se any filtering of command line arguments in:
https://github.com/devspace-sh/devspace/blob/main/pkg/devspace/build/builder/buildkit/buildkit.go
Ok this was an user error I quess. Multi arch builds works when value arguments are passed with --value=arg (NOTE: = instead of space between arg and value).
So this works:
buildKit:
args:
- "--platform=linux/amd64,linux/arm64"
inCluster:
createArgs:
- "--platform=linux/amd64,linux/arm64"