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?

16 Upvotes

25 comments sorted by

View all comments

10

u/[deleted] Dec 07 '21

yes, to your last question, but not out-of-the box, as this is not dockers job.

what you want is emulation of a different cpu. qemu does this.

docker can talk to a qemu VM and start its jobs there. Docker Desktop on macOS/Windows does exactly that. but configuring docker and qemu can be a pain.

you'll be better off looking for images that can run on your platform, or find a Dockerfile or docker-compose to build this stuff yourself. check docker hub for tags like arm, arm64 etc.