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 tonistiigi/xx for cross-platform builds #260

Merged
merged 4 commits into from
Oct 19, 2021

Conversation

darkowlzz
Copy link
Contributor

@darkowlzz darkowlzz commented Oct 12, 2021

Update the Dockerfile to use tonistiigi/xx to cross-compile the
manager binaries natively and speed up the multi-arch image build
time.

Also:

Refer fluxcd/flux2#1910

NOTE: Multi-arch build used to take about 6 minutes on my
machine. Cross-compiling reduces the multi-arch build to under 3
minutes.
Manually tested the built image on amd64 and arm/v7 (raspberry pi).
Haven't tested on arm64.

@darkowlzz darkowlzz marked this pull request as ready for review October 12, 2021 22:27
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks @darkowlzz

@stefanprodan stefanprodan added the area/ci CI related issues and pull requests label Oct 13, 2021
Makefile Show resolved Hide resolved
Update the Dockerfile to use tonistiigi/xx to cross-compile the
manager binaries natively and speed up the multi-arch image build
time.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
e2e:
- Enable buildx.
- Build only for linux/amd64 and export the built image.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
Signed-off-by: Sunny <darkowlzz@protonmail.com>
Prevent running the tests twice in e2e workflow by removing the
dependency on docker-build on test.
Update e2e workflow to remove setting KUBEBUILDER_ASSETS needed to run
tests from "Build container image" step.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci CI related issues and pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants