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
Docker "--platform" broken for native sub-architectures #42732
Comments
This could be a dupe of #611 |
Essentially Once should not have to have |
Will need to have a closer look, but some of this could be related to the normalizing code in containerd (used for platform matching) https://github.com/containerd/containerd/blob/f2c3122e9c6470c052318497899b290a5afc74a5/platforms/platforms.go#L167 /cc @tonistiigi @tianon |
This does not look like a parsing issue but what emulator/fallback reports. |
A couple PRs very relevant to the The way I usually deal with this (for builds of 32bit arches in https://github.com/docker-library/official-images) is to run a separate Docker-in-Docker that uses I'd also share the following quote that occurred recently in a Debian-related context, but I think is very relevant here too:
The primary tools I use for detecting the userspace architecture (as opposed to the kernel architecture) are |
If you want to determine the current arch in Dockerfile use |
Description
Running an armv7l container on aarch64 host fails to show armv7l used.
Similarly running an i386 container on x86_64 host fails to show i386 used.
Steps to reproduce the issue:
Use this Dockerfile:
docker buildx build --platform linux/386 -t 386-build . --load
docker run --platform linux/386 --rm 386-build
Describe the results you received:
x86_64
Describe the results you expected:
i686
Output of
docker version
:Output of
docker info
:And for aarch64:
docker info
:docker version
:Additional environment details (AWS, VirtualBox, physical, etc.):
I can't seem to get the platform feature working to run arm/v7 on the aarch64 host either.
Loosely following the instructions here: https://www.docker.com/blog/multi-platform-docker-builds/
Using the same Dockerfile:
Initial setup:
Then:
Now let's try to run this arm/v7 container:
That doesn't seem right. Let's force platform?
That doesn't look right either.
That seems right, so maybe this is a docker problem and not a build problem?
That seems right, no?
Here's more info about the system:
Running on RPi4B with RPI kernel and current docker:
uname -a
:Linux rpi4b 5.10.52-v8+ #1441 SMP PREEMPT Tue Aug 3 18:14:03 BST 2021 aarch64 GNU/Linux
Originally reported at docker/buildx#725
The text was updated successfully, but these errors were encountered: