-
Notifications
You must be signed in to change notification settings - Fork 139
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
docker: Add arm64-based Dockerfile #505
Conversation
Signed-off-by: Thomas Böhler <[email protected]>
This isn't built in ci? :-) Also, would it be possible to just extend the actions to set the build arch to arm64 with the same Dockerfile ? |
With actions you mean the steps running in the CI? I'm not familiar with the GitHub CI at all, I'm not sure if I can be of help there. I imagine using |
Thanks, @tboehler1 for bringing this up. A native docker container for arm64 builds is a good idea as it encapsulates everything, but keeps the huge benefit when it comes to build times. I agree with @obbardc, that it would be better to maintain a single Dockerfile for all target architectures. This can be done with dockers multiarch support like this:
This would allow to override certain arch specific stuff in a separate stage. Even diffrent base images depending on the target arch are possible. Build is done with explicit target arch:
and without:
or
Even multiple architectures can be build at once:
Note that the list of packages for the specific and generic stage needs probably some review. Haven't checked @tboehler1 s list in detail against the original one. The CI pipeline already uses |
@nbuchwitz I agree with your solution. Can you open a PR? |
Sure, @obbardc. I've created a feature branch in my fork https://github.com/nbuchwitz/debos/tree/devel/add-arm64-support Need to rework some of the piplines to ensure that the multiarch container is tested properly (mostly migrate the build artifacts to oci exports). After that I will open the PR (probably later today or tomorrow). @tboehler1 I've added you as co autor on the commit message. |
Fixed in #513 |
I needed an arm64-based Docker image to run debos but it seems like you don't provide one.
This PR contains the Dockerfile I use to build images on arm64. Arch Linux specific things (notably the archlinux-keyring) aren't installed and handled at all, but seeing that #483 is open this might be put into a separate conatiner for building Arch Linux images anyway?
Feel free to merge if you're okay with the Dockerfile and want to support arm64-based Docker images upstream. Of course I'm open to improve this as well.
Thanks!