Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multi-arch builds #2826

Open
janrito opened this issue Mar 27, 2024 · 3 comments
Open

multi-arch builds #2826

janrito opened this issue Mar 27, 2024 · 3 comments
Labels
kind/feature New feature or feature request

Comments

@janrito
Copy link

janrito commented Mar 27, 2024

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']
@janrito janrito added the kind/feature New feature or feature request label Mar 27, 2024
@patrick-grapple
Copy link

+1

@danielnilsson9
Copy link

+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

@danielnilsson9
Copy link

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or feature request
Projects
None yet
Development

No branches or pull requests

3 participants