Skip to content
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

Cannot run docker image on ARM64 host #71

Open
twilightsorcerer opened this issue Nov 25, 2019 · 16 comments
Open

Cannot run docker image on ARM64 host #71

twilightsorcerer opened this issue Nov 25, 2019 · 16 comments
Labels
new-architectures Attemps ont M1, AMR64, ..

Comments

@twilightsorcerer
Copy link

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 twilightsorcerer changed the title 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 run --privileged --rm -e DISPLAY -v mtgo-data-<my local name>:/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" Nov 25, 2019
@twilightsorcerer twilightsorcerer changed the title docker run --privileged --rm -e DISPLAY -v mtgo-data-<my local name>:/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 run --privileged --rm -e DISPLAY -v mtgo-data-<my local name>:/home/wine/.wine/host/ -v mtgo-data-<my local name>:/home/wine/.wine/drive_c/users/ -v /tmp/.X11-unix:/tmp/.X11-unix:rw -v /home/<my local name>/.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" Nov 25, 2019
@twilightsorcerer twilightsorcerer changed the title docker run --privileged --rm -e DISPLAY -v mtgo-data-<my local name>:/home/wine/.wine/host/ -v mtgo-data-<my local name>:/home/wine/.wine/drive_c/users/ -v /tmp/.X11-unix:/tmp/.X11-unix:rw -v /home/<my local name>/.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" mtgo standard_init_linux.go:211: exec user process caused "exec format error" Nov 25, 2019
@pauleve
Copy link
Owner

pauleve commented Nov 26, 2019

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

@twilightsorcerer
Copy link
Author

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

@pauleve
Copy link
Owner

pauleve commented Nov 27, 2019

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 pauleve changed the title mtgo standard_init_linux.go:211: exec user process caused "exec format error" Cannot run docker image on ARM64 host Nov 27, 2019
@twilightsorcerer
Copy link
Author

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

@pauleve
Copy link
Owner

pauleve commented Apr 10, 2020

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.

@twilightsorcerer
Copy link
Author

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

@pauleve
Copy link
Owner

pauleve commented Apr 10, 2020

Use sudo:

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

@twilightsorcerer
Copy link
Author

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

@pauleve
Copy link
Owner

pauleve commented Apr 10, 2020 via email

@twilightsorcerer
Copy link
Author

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

@pauleve
Copy link
Owner

pauleve commented Apr 10, 2020

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

@twilightsorcerer
Copy link
Author

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

@pauleve
Copy link
Owner

pauleve commented Apr 10, 2020 via email

@twilightsorcerer
Copy link
Author

All done, thanks so much for the help!

@krakenfury
Copy link

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.

@pauleve
Copy link
Owner

pauleve commented Dec 15, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-architectures Attemps ont M1, AMR64, ..
Projects
None yet
Development

No branches or pull requests

3 participants