Open pmatos opened 4 years ago
"uname" is coming from the kernel not from the userspace programs.
A simple-ish way to check is to apt-get update
, you should see i386 package repos listed.
I did notice, however, that --platform
only seems to apply if the with the given tag needs to be pulled, it doesn't seem like the real image sha is resolved per platform if the tag already exists.
Well, I think that setarch i386
can be used:
$ docker run --platform=i386 -ti ubuntu:16.04 /bin/bash
root@3a80cb4c4eae:/# uname -a
Linux 3a80cb4c4eae 4.19.79+ #92 SMP Mon Oct 14 11:37:29 PDT 2019 x86_64 x86_64 x86_64 GNU/Linux
root@3a80cb4c4eae:/# setarch i386
# uname -a
Linux 3a80cb4c4eae 4.19.79+ #92 SMP Mon Oct 14 11:37:29 PDT 2019 i686 i686 i686 GNU/Linux
#
In general, I think the problem is, the --platform
is only for creating the container, not for running it (otherwise we could do personality()
syscall).
Ubuntu i386 image fails to run as i386 on docker.
Expected behavior
When running the image into a shell, I would expect
uname -a
to show me we are in a 32bit image.Actual behavior
Steps to reproduce the behavior
See above.
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.)
Physical x86_64 running ArchLinux.