New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mixing architectures doesn't work #5314
Comments
Is this a QEMU bug? |
Probably. qemu should be able to run containers for the "wrong" architecture, but there are various containers that seem to crash. |
@philipahlberg thanks for your report. I also agree it's a qemu emulation bug. I think the ideal future state is one where most base images are multi-arch supporting both In the meantime, qemu's CPU emulation is a handy stopgap. It works for many images, but definitely not all. It's a shame the error messages when it goes wrong are so unclear. Perhaps we could highlight somewhere in the UI when emulation is in progress to warn people in case they see unexpected behaviour? |
This is a qemu bug, which is the upstream component we use for running Intel (amd64) containers on M1 (arm64) chips, and is unfortunately not something we control. In general we recommend running arm64 containers on M1 chips because (even ignoring any crashes) they will always be faster and use less memory. Please encourage the author of this container to supply an arm64 or multi-arch image, not just an Intel one. Now that M1 is a mainstream platform, we think that most container authors will be keen to do this. |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Using a new M1 MacBook, I tried to build an existing project that had thus far only been used by
amd64
/x86_64
machines. This project uses Docker Compose to create multiple containers, one of which uses a custom image uploaded to Docker Hub. This custom image only supportsamd64
. The image boots and runs, but - at least in my case - gives seemingly random compiler errors (see: rust-lang/rust#80346).Expected behavior
One of the following would be acceptable:
a) The foreign architecture is properly supported.
b) Docker reports a clear error that the foreign architecture is not supported.
Actual behavior
An image built for an architecture different from the local machine's architecture is downloaded and run, but crashes during operation.
Information
Steps to reproduce the behavior
docker-compose.yml
file.amd64
(or possibly any architecture other thanaarch64
).docker-compose build
.I currently don't have a minimal reproducible example, but I can try to set one up if necessary.
Note
I'm wasn't quite sure whether to report this issue here or in
docker/compose
. Apologies if this is the wrong place.The text was updated successfully, but these errors were encountered: