Cannot run docker image on ARM64 host
Hi there. After installing docker and the mtgo image and after adding myself to the docker group and running the ./run-mtgo command, I am returned with the error:
docker run --privileged --rm -e DISPLAY -v mtgo-data-
standard_init_linux.go:211: exec user process caused "exec format error"
I am on an arm64 chromebook.
It seems related to the "ARM" architecture.. could you please provide the complete output of run-mtgo, together with the output of docker version?
tun-mtgo returns:
docker run --privileged --rm -e DISPLAY -v mtgo-data-judeedwardsmith:/home/wine/.wine/host/ -v mtgo-data-judeedwardsmith:/home/wine/.wine/drive_c/users/ -v /tmp/.X11-unix:/tmp/.X11-unix:rw -v /home/judeedwardsmith/.local/share/mtgo/Xauthority:/home/wine/.Xauthority:ro --net=host --ipc=host -e TZ=/usr/share/zoneinfo/Europe/London --name mtgo_running panard/mtgo:latest mtgo
standard_init_linux.go:211: exec user process caused "exec format error"
docker version returns:
Client: Docker Engine - Community Version: 19.03.5 API version: 1.40 Go version: go1.12.12 Git commit: 633a0ea Built: Wed Nov 13 07:28:15 2019 OS/Arch: linux/arm64 Experimental: false
Server: Docker Engine - Community Engine: Version: 19.03.5 API version: 1.40 (minimum version 1.12) Go version: go1.12.12 Git commit: 633a0ea Built: Wed Nov 13 07:26:47 2019 OS/Arch: linux/arm64 Experimental: false containerd: Version: 1.2.10 GitCommit: b34a5c8af56e510852c35414db4c1f4fa6172339 runc: Version: 1.0.0-rc8+dev GitCommit: 3e425f80a8c931f88e6d94a8c831b9d5aa481657 docker-init: Version: 0.18.0 GitCommit: fec3683
Thanks :)
From what I understand, the ARM docker cannot run x86/amd64 images. Although there are ways to build images for arm, I'm quite sure it is a dead end in our case as MTGO is a x86 binary (and wine is not an emulator).
There is docker-machine (see e.g., https://linuxhint.com/setup_docker_machine_virtualbox/) which allows managing docker within virtual machines, but there I'm not sure VirtualBox or VMWare support arm64 hosts. If it is the case, it is definitely worth trying. Keep me in touch if you manage to do so.
Not very good with computers, don't think I could work out how to do that :( Thank you so much anyway :)
Apparently there is now a way to do so:
Run
docker run --rm --privileged aptman/qus -s -- -p i386
Then, hopefully, ./run-mtgo may work.
Keep me in touch, and please paste the output of all these commands in case of troubles.
docker run --rm --privileged aptman/qus -s -- -p i386 outputs: cat ./qemu-binfmt-conf.sh | sh -s -- --path=/qus/bin -p i386 --suffix -static mount: permission denied (are you root?)
Use sudo:
sudo docker run --rm --privileged aptman/qus -s -- -p i386
I tried that, it returns the same error: cat ./qemu-binfmt-conf.sh | sh -s -- --path=/qus/bin -p i386 --suffix -static mount: permission denied (are you root?)
Then try sudo bash and then the docker command..
Le 10 avril 2020 16:22:47 GMT+02:00, twilightsorcerer [email protected] a écrit :
I tried that, it returns the same error: cat ./qemu-binfmt-conf.sh | sh -s -- --path=/qus/bin -p i386 --suffix -static mount: permission denied (are you root?)
-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/pauleve/docker-mtgo/issues/71#issuecomment-612050536
-- Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
Still the same error.
judeedwardsmith@penguin:~$ sudo bash root@penguin:/home/judeedwardsmith# docker run --rm --privileged aptman/qus -s -- -p i386 cat ./qemu-binfmt-conf.sh | sh -s -- --path=/qus/bin -p i386 --suffix -static mount: permission denied (are you root?)
Damned.. Maybe worth asking at https://github.com/dbhi/qus with details on your OS and docker version.. Alternatively, you may try:
docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64
docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64 returns Unable to find image 'docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64' locally a7996909642ee92942dcd6cff44b9b95f08dad64: Pulling from docker/binfmt docker: no matching manifest for linux/arm64/v8 in the manifest list entries. See 'docker run --help'.
Thanks for the help anyway :)
OK, so your best chance is to open an issue on the project I mentioned asking for help.. Too bad, it looked promising!
Le 10 avril 2020 18:24:30 GMT+02:00, twilightsorcerer [email protected] a écrit :
docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64 returns Unable to find image 'docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64' locally a7996909642ee92942dcd6cff44b9b95f08dad64: Pulling from docker/binfmt docker: no matching manifest for linux/arm64/v8 in the manifest list entries. See 'docker run --help'.
Thanks for the help anyway :)
-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/pauleve/docker-mtgo/issues/71#issuecomment-612106530
-- Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
All done, thanks so much for the help!
Hello and thanks for leaving this issue open!
I just tried today with the qus project, and have an error log to share in this gist:
https://gist.github.com/krakenfury/0bf0762e415f75aeb855cae9452b0c81
Using a Pinebook Pro running 5.6.0-2-MANJARO-ARM.
It takes a few minutes to generate the log then output stops, but I let it hang for 5 min or so just to see if it did anything else.
Also, Wine opens an error in a window at line 461 that says:
A program on your system has crashed, but WineDbg was unable to attach the process to obtain a backtrace.
With the latest wine 9.0-rc1, we can start hoping for native arm64 wine for executing mtgo. You can give a try using the following commands to build a native arm64 image:
git clone -b wow64-multi https://github.com/pauleve/docker-mtgo.git docker-mtgo64
cd docker-mtgo64
git submodule update --init
make -C docker-wine
make
If successful, you can then try in the docker-mtgo64 folder:
./run-mtgo panard/mtgo:wow64
Alternatively, to try emulating amd64 imaged, the following setup might work:
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
Then try ./run-mtgo --update panard/mtgo:latest