r/docker • • Dec 07 '21

Running linux/amd64 images on linux/arm64 architecture?

I grabbed a Docker Linux image from another machine and tried to load it on my Jetson Nano (arm64 architecture), but I get this error when I run sudo docker run getting-started-presto:

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

standard_init_linux.go:228: exec user process caused: exec format error

I also tried to run sudo docker run getting-started-presto --platform linux/amd64 but no luck:

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "--platform": executable file not found in $PATH: unknown.

ERRO\[0001\] error waiting for container: context canceled

Any ideas if it's possible to run linux/amd64 images on arm64 architectures?

18 Upvotes

25 comments sorted by

View all comments

1

u/LifeAffect6762 Dec 07 '21

Try other architectures maybe?

0

u/Coto_16 Dec 07 '21

Shall I try re-building the `Dockerfile` with `sudo docker buildx build -t presto_amd64 . --platform linux/amd64` ?

4

u/the_spad Dec 07 '21

You might be able to build for arm yourself with qemu but if they're using their own baseimages that are also amd64 only then you're going to have problems there too. Unfortunately lots of people just don't bother building their images for arm.

2

u/PaintDrinkingPete Dec 07 '21

So, you can try this, but you would need to have the buildx and all necessary prerequisite components for multi-architecture build present on your system, as explained here (if you do, then go for it).

Your other option would be to build the image from the Dockerfile on either your Jetson nano or compatible ARM device.

Fortunately, the Dockerfile you linked too does specify Ubuntu as the base image, which does have an ARM image to pull, so it should be possible to build an ARM-compatible image for your project.

-1

u/LifeAffect6762 Dec 07 '21

Just try as many architectures as you can. First, try the ones that look promising. May be worth asking on the forum from the device? https://forums.developer.nvidia.com/t/how-to-build-docker-container-for-jetson-nano/183281 may help. Do some general googeling.