-
Notifications
You must be signed in to change notification settings - Fork 118
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
Wrong CPU architecture in /proc/cpuinfo when using --platform #5245
Comments
I noticed this issue while trying to build various software packages locally using docker mac and in github action using qemu. Mainly the problem happens with configure script, cmake script etc that read |
Thanks for reporting, but this is not a bug. This also happens on Linux hosts with Intel CPU:
This is becaus it still runs with the Linux kernel on Intel, only with QEMU to emulate the arm64 binaries. And therefore it still shows the cpuinfo from the host. Container are more or less only namespaces and no full encapsulated emulators across different CPU architectures. Running containers with a different architecture might run into issues when the application checks for such information and then mis-interprets that it's running eg. ARM binaries. But that's part of the business logic in the application and we can't do anything about this. I'll close this ticket, but feel free to comment if you have questions. |
@StefanScherer Ok! thanks for the answer. Would it be possible for docker to somehow have synthetic proc files to workaround this? |
@wader No, we're not keen on messing around with these proc files. :-) |
@StefanScherer true :) i was thinking just cpuinfo and maybe some others that are known to be ”wrong”? maybe its not easy to overlay just some files in proc also? |
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. |
Expected behavior
That
/proc/cpuinfo
indicated the emulated CPU.Actual behavior
/proc/cpuinfo
shows intel CPU.Steps to reproduce the behavior
I first reported the issue here containerd/containerd#4109 but then got unsure it's the correct place.
The text was updated successfully, but these errors were encountered: