

It appears to be much slower, so don't do it 🙂 Note that with the M1, Docker is switching to the new hypervisor system from Apple, but even then there are performance differences if you click on to enable new hypervisor.

QEMU emulator version 5.2.0 (v5.2.0-11-ge7395802aa)Ĭopyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers And in fact you can run it as a command-line thing and for Docker 4.3 it returns that it is the v5.2.0-11 Docker version of the emulator which is way behind like 20,000 commits behind (you can see this in their open source project), the current version 6.2, so it is kind of temping just to copy the binary over and see what happens :-): bash> /Applications/Docker.app/Contents/MacOS/qemu-system-aarch64 -version Turns out that Docker Desktop for Mac ships with its own version of QEMU kept in /Applications/Docker.app/Contents/MacOS/qemu-system-aarch64 and they maintain their own version of QEMU which appears to be way behind the master. Well, the long and short of it is that no one knows what is going on. Īnd what this does is create a container called demo-image and it will build for Intel/AMD 64-bit, ARM64 which is for Apple Silicon and Arm v7 What is all this about Signal 6 in QEMU but it works with Docker v4.0 You can infact do builds using something called buildx which knows how to do multiple builds for multiple architectures which is pretty cool so: docker buildx build -platform linux/amd64,linux/arm64,linux/arm/v7 -t richt/demo-image. This will find the AMD64 version of the minimal Jupyter notebook and then get the image, start an M1 virtual machine and then start a container that runs under QEMU which translates Intel instructions into ARM instructions Using Buildx to build containers Or the long form is using a new flag: docker run -p 8888:8888 -platform=linux/amd64 jupyter/minimal-notebook And if it detects it needs to run an Intel container (technically this is called an Linux/amd64 container since AMD did the first 64-bit extension to Intel), then it will run QEMU which is an emulator inside of an Apple hypervisor session.Īnd in fact, if you set DOCKER_DEFAULT_PLATFORM=linux/amd64 as an environment variable and it will always pull images that are for Intel onto your M1 machine which is pretty cool if you are doing Intel image development for say a cloud application. So what is going on? Well first of all on an Apple M1, what Docker Desktop for the Mac does is that it runs using a hypervisor inside of Apple. The problem is that the current Docker for Mac v4.3 has a QEMU crash with qemu uncaught target signal 6 when running. But Docker apparently allows you to run and build containers that are multiarchitecture. He has some docker images which will not build on Apple AARCH64 (aka Arm64) architecture because they are so old. OK, spent an hour with Alex working on this problem.
