Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 1.56 KB

multi-arch.md

File metadata and controls

36 lines (25 loc) · 1.56 KB
aliases description keywords menu title
/mackit/multi-arch/
Multi-CPU Architecture Support
mac, Multi-CPU architecture support
main
identifier parent weight
mac-multiarch
pinata_mac_menu
3
Leveraging Multi-CPU Architecture Support

Leveraging Multi-CPU Architecture Support

Docker for Mac provides binfmt_misc multi architecture support, so you can run containers for different Linux architectures, such as arm, mips, ppc64le and even s390x.

This should just work without any configuration, but the containers you run need to have the appropriate qemu binary inside the container before you can do this. (See QEMU for more information.)

So, you can run a container that already has this set up, like the resin arm builds:

$ docker run resin/armv7hf-debian uname -a

Linux 7ed2fca7a3f0 4.1.12 #1 SMP Tue Jan 12 10:51:00 UTC 2016 armv7l GNU/Linux

$ docker run justincormack/ppc64le-debian uname -a

Linux edd13885f316 4.1.12 #1 SMP Tue Jan 12 10:51:00 UTC 2016 ppc64le GNU/Linux

Running containers pre-configured with qemu has the advantage that you can use these to do builds FROM, so you can build new Multi-CPU architecture packages.

Alternatively, you can bind mount in the qemu static binaries to any cross-architecture package, such as the semi-official ones using a script like this one https://github.com/justincormack/cross-docker. (See the README at the given link for details on how to use the script.)