distribution: Docker armhf unable to run arm64v8 containers
I reported this on the forums some years ago: https://forums.docker.com/t/unable-to-run-aarch64-containers-from-armv7-docker/67187
The problem is still there, but it’s easier to reproduce now that the Raspberry Pi Foundation provides an aarch64 kernel. To repro on Raspbian Buster:
-
Install Docker CE.
-
Run
sudo rpi-updateto download the latest 64-bit kernel. -
Edit
/boot/config.txtadd the linearm_64bit=1, ideally under the [pi4] section if this is being tested on a Pi 4. -
Reboot, and confirm
uname -mshows you’re now running an aarch64 kernel.
pi@raspberrypi:~ $ docker run -it arm64v8/debian
pi@raspberrypi:~ $ echo $?
159
LXC, systemd-nspawn, or plain chroot do not have this problem. They are able to seamlessly jump from a 32-bit userland to a 64-bit container/chroot.
If there is a fundamental reason that this cannot work with Docker’s design, it should be documented and the command should provide a more informative message than null output with return code 159.
64-bit Docker containers on Raspberry Pi have a number of use-cases. At this time it seems that it’s only practical to run these on non-Raspbian distros that possess a native 64-bit userland.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 15
- Comments: 18
Hello jdonald. Want to do the same things and have same errors. Except that work well with --privileged…
Ok, that got me digging, this also works;
Taken from: https://github.com/moby/moby/issues/20550
The problem seem to be the archMap part of the default.json. Replacing this by
"architectures": [ "SCMP_ARCH_AARCH64", "SCMP_ARCH_ARM" ],all seem to work.I was sent over to https://github.com/moby/moby repository in the other issue
I wrote a workaround here: https://github.com/moby/moby/issues/41092#issue-636455908 I will note that I wrote this in Jun, in the issue tracker that was asked, and got no answer (not even wontfix). This is after being redirected twice to different github issue trackers.
@dmcgowan Done https://github.com/docker/for-linux/issues/1008