利用多CPU架構(gòu)支持
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.
Docker for Mac提供<code>binfmt_misc</code>多架構(gòu)支持墨林,所以,你可以在不同的Linux架構(gòu)上筷黔,例如<code>arm</code>猾封,<code>mips</code>涩维,<code>ppc64le</code>和<code>s390x</code>運行容器container
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.)
這不需要您作任何設置就可運行,但在這之前,你運行的容器里需要兼容<code>qemu</code>二進制
So, you can run a container that already has this set up, like the resin arm builds:
所以铐然,你可以運行早已配置好這個的容器,例如<code>resin</code>arm builds
<pre>
$ 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
</pre>
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.
運行預配置好<code>qemu</code>的好處是你可以使用它來編譯FROM恶座,所以你可以編譯新的多CPU封裝包
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.)
或者搀暑,你可以在<code>qemu</code>靜態(tài)二進制中綁定掛載到任何跨架構(gòu)封裝包。