docker-mtgo icon indicating copy to clipboard operation
docker-mtgo copied to clipboard

Cannot run docker image on ARM64 host

Open twilightsorcerer opened this issue 6 years ago • 16 comments

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-:/home/wine/.wine/host/ -v mtgo-data-:/home/wine/.wine/drive_c/users/ -v /tmp/.X11-unix:/tmp/.X11-unix:rw -v /home//.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"

I am on an arm64 chromebook.

twilightsorcerer avatar Nov 25 '19 10:11 twilightsorcerer

It seems related to the "ARM" architecture.. could you please provide the complete output of run-mtgo, together with the output of docker version?

pauleve avatar Nov 26 '19 15:11 pauleve

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 :)

twilightsorcerer avatar Nov 26 '19 17:11 twilightsorcerer

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.

pauleve avatar Nov 27 '19 09:11 pauleve

Not very good with computers, don't think I could work out how to do that :( Thank you so much anyway :)

twilightsorcerer avatar Nov 27 '19 19:11 twilightsorcerer

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.

pauleve avatar Apr 10 '20 12:04 pauleve

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?)

twilightsorcerer avatar Apr 10 '20 13:04 twilightsorcerer

Use sudo:

sudo docker run --rm --privileged aptman/qus -s -- -p i386

pauleve avatar Apr 10 '20 13:04 pauleve

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?)

twilightsorcerer avatar Apr 10 '20 14:04 twilightsorcerer

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é.

pauleve avatar Apr 10 '20 14:04 pauleve

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?)

twilightsorcerer avatar Apr 10 '20 15:04 twilightsorcerer

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

pauleve avatar Apr 10 '20 16:04 pauleve

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 :)

twilightsorcerer avatar Apr 10 '20 16:04 twilightsorcerer

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é.

pauleve avatar Apr 10 '20 16:04 pauleve

All done, thanks so much for the help!

twilightsorcerer avatar Apr 10 '20 17:04 twilightsorcerer

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.

krakenfury avatar Jun 10 '20 01:06 krakenfury

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

pauleve avatar Dec 15 '23 10:12 pauleve