> On Nov 18, 2021, at 1:27 PM, Chris Lambertus <c...@apache.org> wrote:
>
> x86_64 docker on M1 is going to be running under rosetta2 emulation mode (i
> didn't even know you could do that,) and would potentially be considerably
> slower than native x86_64 hardware.. The results would likely be different if
> you were performing this natively on AARCH64... I'm not sure what you meant
> about building both amd64 and arm64, are you running an arm64 cross compiler
> on an amd64 emulated docker image on an M1?
>
Yup. Docker’s buildx framework allows you to build multiple
architecture images in an emulation mode simultaneously to avoid all the
craziness of using manifests to publish the same tag with different
architectures attached. More details here:
https://docs.docker.com/buildx/working-with-buildx/
On Linux, it uses qemu (as above). On Docker Desktop for Mac… I’m
honestly not sure what it is doing, but, I’d like to think it is using Rosetta
2 + secret sauce but it was so slow that I’m actually wondering if it doesn’t
run qemu-x86 in the VM. :/ I need to spend more time playing with it to see
what is going on under the hood.
For the version of the Yetus containers sitting in ghcr.io, it was
built using a single GitHub runner + qemu via GitHub Actions. You can see
* the log of the run here:
https://github.com/apache/yetus/actions/runs/1476885666 (warning: it is big so
use raw mode)
* the workflow here:
https://github.com/apache/yetus/blob/main/.github/workflows/ghcr.yml
* the raw docker commands here:
https://github.com/apache/yetus/blob/main/hooks/build
(Because it is in hooks/build, if Docker Hub ever fixes their stuff, Yetus will
automatically pick it up.)