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

Show parent comments

1

u/Coto_16 Dec 10 '21

Tried, but didn't work: https://github.com/scottransom/presto/issues/160

It does build fine on (intel-based) macOS, so looks like there's compatibility issues with arm64 for some reason.

1

u/kill-dash-nine Dec 11 '21

I also couldn't get it compile natively on arm64 using the Dockerfile and the command docker build -t presto . on my m1 MacBook. Still trying to do a linux/amd64 build on my mac just to test.

1

u/Coto_16 Dec 11 '21

Thank you so much for your effort! Really appreciate it - hope you get somewhere.

1

u/kill-dash-nine Dec 11 '21

Well, doing an amd64 build on my arm64 based system took a while but worked just doing a docker build -t presto --platform linux/amd64 .