3

Situation: Looking to deploy Docker app on an ODROID XU4 (octa-core arm32).

Problem: High likelihood that Docker image is in x86_64.

Question: Is it possible to run the x86_64 Docker image on an arm32 computer? If so, are there any configurations that need to be done (e.g. Qemu)?

2 Answers 2

2

Containers are not virtual machines, they are normal Linux processes with additional security measures. Container images are (conceptually) little more than a ZIP archive that can be mounted as a file system.

If you want to run the x86-64 software in a container image, you need to run this in a x86-64 Linux system. If you have a different host system, you will need a virtual machine. Your thought about using Qemu is good since that lets you emulate a different CPU architecture.

What you are trying to do may be possible, but it is non-trivial.

  • Try to stick to ARM images. They do exist. If in doubt, build them yourself.
  • Very recently (Q2 2019), some Docker versions have started to integrate built-in Qemu emulation which may help with building ARM containers. You will have to install the docker buildx command separately. While the use case is primarily building ARM images on x86, you should be able to also use it the other way around.
6
  • But if I Qemu an x86_64 on arm32 I'm sort of asking for trouble right? Commented Aug 9, 2019 at 11:34
  • 1
    @TimothyWong Yes, what you're trying to do does seem slightly insane – but not fundamentally impossible. Still, it would be easier to just stick to arm images, building them yourself if necessary. There are still tens of thousands of arm images on DockerHub.
    – amon
    Commented Aug 9, 2019 at 12:09
  • Hello, Could you update this answer to include the latest development. My use case, I want to run a dock x86 image containing the game Valheim on ARM on a raspberry pi 3 or 4 (both are arm64)
    – Shodan
    Commented Apr 4, 2021 at 20:08
  • @Shodan Sorry, I can't really expand the answer in that direction. Please also note that Docker is primarily a productivity tool, and is not particularly useful for gaming. Furthermore, please note that Raspis have extremely limited 3D performance, about 50x less than a Nintendo Switch. So even if the driver situation works out, you won't have a remotely playable game.
    – amon
    Commented Apr 5, 2021 at 6:34
  • Oops I forgot to specify that it is the valheim dedicated server bin that I'm trying to run. This is for a headless pi.
    – Shodan
    Commented Apr 5, 2021 at 21:22
1

I wrote a blog post few years back on buildx which might be useful. https://collabnix.com/building-arm-based-docker-images-on-docker-desktop-made-possible-using-buildx/

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .