-
Notifications
You must be signed in to change notification settings - Fork 24
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
workflows: build within emulated container #276
workflows: build within emulated container #276
Conversation
First off, let me apologize for taking so long to look into this. It's really quite cool. I spent some time messing around a bit and I think we can greatly simplify things. I was able to build and run an arm64 version of the operator container image using the standard Dockerfile and Makefile. I don't think the additional new Dockerfile.build is necessary. Similarly I don't know if the shell script is needed, but it could be useful to adapt it to mainly check for the special dependencies needed to build an arm64 build on a non-arm platform. I was able to build the container using the command I "verified" the build using:
Which is super cool! I also experimented building a samba-container project image a similar way:
I didn't really run the builds "in anger" though. (I'm wishing I had a arm64 SBC right now to fool around with too ;-) ) I think we can start by adapting the workflow you have and just using this emulation technique to build, but not push, the arm image to prevent any possible cross platform regressions. Later, I think we need to investigate https://podman.io/blogs/2021/10/11/multiarch.html which may impact how we build in general - before we start pushing arm64 images to quay (for example). |
Use QEMU to build samba-operator within containerized environment; either AMD64 or ARM64 architectures (regardless of local host architecture). Using this method we can ensures that all build tools are properly configured on architectures other than default x86_64, without relaying on specific hardware. Signed-off-by: Shachar Sharon <[email protected]>
e6f70a6
to
bfe7cd1
Compare
@phlogistonjohn Fascinating findings! I was able to have same results on my local machine as well (+ more).
|
Fine by me, PR numbers are not a precious resource. :-) Let me know if you plan on doing the new PR or you'd like me to start, as I now have the needed bits to try it out. |
@phlogistonjohn This PR should now be abandoned in favor of #301 |
Closing per previous comment. |
Use QEMU to build samba-operator within containerized environment; either AMD64 or ARM64 architectures (regardless of local host architecture). Using this method we can ensures that all build tools are properly configured on architectures other than default x86_64, without relaying on specific hardware.
Signed-off-by: Shachar Sharon [email protected]