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

Use the Docker Build Kit platform vars #265

Merged

Conversation

dave-shawley
Copy link
Contributor

The Docker Build Kit exports the target OS and architecture as build args so we can use them instead of assuming linux/amd64. The default values are set to linux/amd64 in case you are building in a docker version that does not have build kit available. You may also need to set DOCKER_BUILDKIT=1 for it to export TARGETOS and TARGETARCH correctly.

I'm not sure what incantations are required in the Github actions to build on ARM as well as Intel but this should "just work" if you are building on an ARM CPU. This is a start to addressing #147 though additional CI work is required.

https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope

The Docker Build Kit exports the target OS and architecture as build
args so we can use them instead of assuming linux/amd64.

https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope

Signed-off-by: Dave Shawley <daves@aweber.com>
@jetstack-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: dave-shawley

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jetstack-bot jetstack-bot merged commit a6fc7f8 into cert-manager:main Apr 14, 2023
20 checks passed
@dave-shawley dave-shawley deleted the use-docker-buildkit-vars branch April 17, 2023 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants