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

Enable cross platform builds #471

Merged
merged 2 commits into from
Jan 28, 2023
Merged

Enable cross platform builds #471

merged 2 commits into from
Jan 28, 2023

Conversation

guineveresaenger
Copy link
Contributor

This schematizes the platform build field, which provides
cross-platform build abilities akin to the docker CLI's --platform
flag.
When set, the provider will build an image for the platform specified.

Fixes #470
Fixes #296

  • Add Platform build input
  • Generate SDKs

This schematizes the `platform` build field, which provides
cross-platform build abilities akin to the docker CLI's `--platform`
flag.
When set, the provider will build an image for the platform specified.
@guineveresaenger guineveresaenger requested a review from a team January 28, 2023 00:17
@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

@guineveresaenger guineveresaenger merged commit 8ef5144 into master Jan 28, 2023
@guineveresaenger guineveresaenger deleted the implement-platform branch January 28, 2023 00:45
@tlinhart
Copy link

@guineveresaenger If I see correctly, the platform field supports a string. But the --platform flag for build supports specifying multiple values for a platform. Will this be addressed?

@AaronFriel
Copy link
Contributor

AaronFriel commented Jan 30, 2023

@tlinhart It looks like BuildKit only accepts a string.

@guineveresaenger Should we add a test here to ensure that Platform: "linux/amd64,linux/arm64" works?

@iwahbe
Copy link
Member

iwahbe commented Jan 30, 2023

Another design option would be to change platform: string to platforms: array(string). We would then natively support Platform: ["linux/amd64", "linux/arm64"]. I'm not sure if this is worth it, but its some thing we should consider.

@AaronFriel
Copy link
Contributor

AaronFriel commented Jan 30, 2023

I prefer to hew close to what BuildKit's API & Docker CLI accept whenever possible, especially when they both agree. If we're idiomatic with those, it's easy to translate examples into Pulumi, it sets our users up for success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image: Implement crossplatform builds Support multi-arch images (aka v2 or OCI Image Index manifests)
4 participants