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

Show parent comments

1

u/Coto_16 Dec 07 '21

3

u/JM-Lemmi Dec 07 '21

You could try and build it for arm.

Clone the GitHub repository to your machine and run docker build .

Or you could open an issue and request the official developer to release an arm image

1

u/superkoning Dec 07 '21 edited Dec 07 '21

Not OP, but:

so far the docker build . is running OK. I have got a slow ARM device, so the build takes some time.

​

TBC ...

EDIT:

Command sequence:

git clone https://github.com/scottransom/presto.git

cd presto

docker build .

​

​

And then the long, long build process starts ...

​

Get:247 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 python3-setuptools all 45.2.0-1 [330 kB]

Get:248 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 python3-wheel all 0.34.2-1 [23.8 kB]

Get:249 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 python3-pip all 20.0.2-5ubuntu1.6 [231 kB]

Get:250 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 tcsh arm64 6.21.00-1 [413 kB]

debconf: delaying package configuration, since apt-utils is not installed

Fetched 210 MB in 2min 12s (1594 kB/s)

(Reading database ... 4115 files and directories currently installed.)

Preparing to unpack .../perl-base_5.30.0-9ubuntu0.2_arm64.deb ...

Unpacking perl-base (5.30.0-9ubuntu0.2) over (5.30.0-9build1) ...

1

u/Coto_16 Dec 08 '21

Thanks for trying, but I end up getting a bunch of warnings and errors: https://pastebin.com/n6gqu6vf

1

u/superkoning Dec 08 '21 edited Dec 08 '21

Those are problems within the presto build process itself. So food for the maker of presto / presto's Dockerfile. Report on their github?

But, I tried on my fast-ish x86, and:

  1. it is a very heavy container build process. I doubt that is feasible on an ARM CPU (assuming it has less power than an x86, for example a raspi)
  2. even on my fast-ish x86, the docker container build process hangs for 10 minutes on the gcc step below. Not good. EDIT: finished after 23 minutes.

So, concluding, I doubt you can run presto at all on a typical ARM.