Leveraging multi-CPU architecture support

利用多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)封裝包。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • 以下原文轉(zhuǎn)載于(https://docs.docker.com/docker-for-mac/)(想找中文版的最新...
    Veekend閱讀 7,783評(píng)論 0 17
  • 有一點(diǎn)沖動(dòng)也有一絲決絕的加入了無(wú)戒的365訓(xùn)練營(yíng)。長(zhǎng)久以來(lái)一直有想要每天寫(xiě)東西的念頭,去年工作的原因記了一年的流水...
    夢(mèng)回千城閱讀 346評(píng)論 1 1

友情鏈接更多精彩內(nèi)容