-
Notifications
You must be signed in to change notification settings - Fork 224
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
[Feature] Add Docker buildx multi-arch support #770
Comments
@utsavanand2 just asked me about this issue.
For instance, I am also not sure whether Kaniko or other builds support this notion as of yet, it certainly won't work with openfaas cloud which uses the above shrink-wrap approach. We recently added the ability to pass a To enable Buildkit, you can run |
/set title: [Feature] Add Docker buildx multi-arch support |
I spent some time prototyping this. There is a bit of a problem at present with the way that buildx vs docker works. buildx for Multiplatform can't build to the local library, so must push to a registry to then be pulled back and used again. This is due to multi-arch manifests. See tweet I prototyped this and hacked the I would welcome suggestions on how we move this forward from a user-experience point of view. |
As a follow-up, buildx will need to be used to build each image separately, passing one architecture / platform at a time. At the push step, we will need to push each image, and then create a manifest against the target repository. |
This feature is important for M1 mac users who are deploying to non-arm architectures. In this case, it is important to build with the If the fix is any easier in the short term, I would welcome a single-valued EDIT: I also think it would be nice to be able to set this in the |
M1 Mac user here, was looking for a solution. At the moment my workaround is to set the DOCKER_DEFAULT_PLATFORM=linux/amd64 faas-cli -f <cfg.yml> up |
@crispyricepc you should just be able to write the following?
And to be clear, you want to cross-compile to amd64 from your M1 right? |
In order to support the packaging of a function multi-platform docker images, the FaaS CLI build command needs to provide new options to select the target platforms
Expected Behaviour
Ability to pass a list of target platforms to the docker build.
Current Behaviour
There's no option to pass this parameter.
Possible Solution
Add a new parameter
--platform
to thebuild
command.The supported platforms (e. g.
linux/amd64,linux/arm/v7
) should be included in thefaas-cli build --help
Experimental docker features (buildx/buildkit) should be enabled implicitly.
Context
While building multi-platform in a CI, the build needed to be triggered outside the faas-cli using native docker commands.
The text was updated successfully, but these errors were encountered: