Open moises-addcomm opened 7 months ago
I have exactly the same problem. Also Windows 11, WSL 2 (Docker Desktop) and building from ubuntu for linux/arm64.
Get the same seg fault when dpkg is trying to configure libc-bin.
Since Arm64 arches are now very much recommended for modern server infrastructure, it would be nice to have this fixed asap or at least have a workaround.
Fyi, as a workaround, since I don't think this step should be required when running docker desktop (or it should be boldly marked in your cross compilation docs.):
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes -c yes
This should effectively pull multiarch/qemu-user-static
, re-setup qemu-user-static
with :latest
to be properly installed and configured with binfmt
, that comes wiith Docker desktop.
After this, running docker buildx build --platform linux/amd64,linux/arm64 <your_image_name>
succeeds for both platorms and runnig docker run --rm --platform linux/arm64 <your_image_name> uname -m
produces aarch64
as expected.
More on what this command does: https://stackoverflow.com/questions/72444103/what-does-running-the-multiarch-qemu-user-static-does-before-building-a-containe
If you believe I did something wrong on my end, or had wrong assumptiond, to run into this issue, please tell me. I'm still rather new to Docker :)
Thanks!! That workaround actually worked. Anyway, I think this still needs to be fixed.
This happened to me too - I was able to build a linux/arm64/v8 image on Windows Docker Desktop a few weeks back (for a personal project), and then today I wasn't able to. The linux/arm64/v8 platform was missing from the default builder, but not sure when it happened? I wonder if it was related to a Windows upgrade as I got one a few days ago. I publish the images to my own docker account, so could tie the uploads to a working combo of Windows & Docker Desktop if it helps?
I was on Docker Desktop 4.26, so I decided to upgrade to 4.31 and it didn't change it. Followed the commands and I was able to build my image.
I've attached a screenshot of the error message if it helps, can attach the full logs if it helps? My Docker Desktop sends usage statistics so I can give my account details if needed
Description
Since version 4.26 there is no way to build a multi-platform build that uses the platform linux/arm64/v8. An error in qemu is thrown: 31.46 Setting up mount (2.37.2-4ubuntu3.4) ... 31.48 Processing triggers for libc-bin (2.35-0ubuntu3.6) ... 31.57 qemu: uncaught target signal 11 (Segmentation fault) - core dumped Sub-process /usr/bin/dpkg returned an error code (1)
When I run it on a Mac, the build is built without problems
Reproduce
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -yq RUN apt-get upgrade -yq
RUN apt-get autoremove -y
Expected behavior
The command
docker buildx build
should created the image on the platform selected. If it's run with this platforms--platform linux/amd64,linux/arm/v7
it's created properly.docker version
docker info
Diagnostics ID
52BFDE32-9FA6-4A91-AA13-11B3967F6A38/20240410215247
Additional Info
Running on Windows 11 under WSL2 with a Ubuntu 22.04