利用多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>運(yùn)行容器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.)
這不需要您作任何設(shè)置就可運(yùn)行,但在這之前,你運(yùn)行的容器里需要兼容<code>qemu</code>二進(jìn)制
So, you can run a container that already has this set up, like the resin arm builds:
所以,你可以運(yùn)行早已配置好這個(gè)的容器,例如<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.
運(yùn)行預(yù)配置好<code>qemu</code>的好處是你可以使用它來(lái)編譯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)二進(jìn)制中綁定掛載到任何跨架構(gòu)封裝包。