-
Notifications
You must be signed in to change notification settings - Fork 101
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
[Ideas] Apple Silicon (ARM64) Docker bitfmt support in Whalebrew #138
Comments
Hi! sorry about the late reply This is indeed a good idea to support apple silicon.
|
Hi! |
binfmt not bitfmt, and it's linux kernel thing: |
I don't think it’s the same thing I would have put the ‘_misc’, but does emulate that functionality and yes that was a typo 🫢 https://github.com/tonistiigi/binfmt I think its this image used by buildkit which is a bundle of qemu emulators for different platforms.
|
Docker for macOS M1 already packs QEMU with AMD64 support. If a system isnt supported by emulation or otherwise you have to install binfmt image , as mentiond I don't think that this will be needed though. Unless you plan to build for and run a lot more platforms. video demo here: https://youtu.be/hWSHtHasJUI?t=268 So I think would mean you could upload the various platforms as the one named item to docker hub and docker would automatically download the native version if possible unless over ruled. |
As you may know Docker Desktop for Mac for Apple Silicon allows you to run x86/x86_64/amd64 via its inbuilt emulation
I believe Docker calls this bitfmt and originated in buildx but is now in mainstream.
To pull a particular platform version of an image you can use an switch in the docker file
FROM --platform linux/amd64 <image name>
It is also possible to do the same on Intel Macs, Linux and Windows to run Linux ARM64 code
[Windows Docker also has the added feature of Windows containers but I don't know much about that it is currently outside my scope of usage but I can see good to have .]
My 2 cents
So the concept for me would to be able to run Linux tools and tools yet to have ARM64 support and their dependencies on Apple Silicon in a Docker container integrated into Darwin almost seamlessly. e.g Pandoc , TeX , development environments etc
Also a user might want to use specific platform version or specific version.
So my proposal would be to first have a mechanism to list platforms available
then to have an argument, config dot file and/or environment variable to select which platform to install.
I don't now the best way to do this
2 The other idea, more complex , to have each package have a meta file or comments in the dockerfile to parse showing the different platforms and versions available then have whalebrew alter the docker file or Dockerfile template FROM lines (--platform) automatically before building the image. If you use the meta file idea you can add descriptions and info as well which can be used by the client and be extended for new features in the future.
The text was updated successfully, but these errors were encountered: