Docker build fails on M1 MacBook
Closed this issue · 5 comments
Error is:
qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
It can be fixed by changing:
FROM debian:stable-slim
to
FROM --platform=linux/amd64 debian:stable-slim
Although I don't know enough about the build process to know if it's a good idea to add that for everyone.
Sorry for not working on this sooner.
Is anyone with a M1 Mac able to confirm that this is still a problem? I'm wondering if this is something the ecosystem has worked out over time, or whether it's still helpful.
I think this would be a safe change to make, if it's still helpful.
On my M2 Max MacBook Pro with macOS Sonoma Version 14.3 (23D56) and Docker version 25.0.2, build 29cf629, this issue doesn't reproduce.
I assume it was related to base images/pacakges not being available with arm64
platforms upstream/on docker.io?
When I ran it just now the debian/stable:slim container seemed to be pulling arm64 packages, anyway.
Let's close this for now then... I don't know if there are best practices for cross platform Docker we should be implementing (isn't Docker supposed to abstract that stuff away??) but it seems like it's working alright at this point.
Ah right. I created a PR for wattsi to do that cross-platform Docker stuff whatwg/wattsi#160