简体   繁体   中英

How to run amd64 image Docker on arm (Raspberry OS)

I have used the docker image Rotating TOR on amd64 architectures with no problem. Now I try to run the same image on Raspberry OS (arm 32 bit) but I have not succeeded.

This is the error when executing the image:

$ docker run -d -p 5566:5566 -p 4444:4444 --env tors=25 mattes/rotating-proxy
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested

I have tried adding platform linux/adm64 after the run but the image does not work either.

Does anyone know how to run this image on Raspberry OS or is there just no way to do it? Thanks for the help.

That won't work

Docker is a virtualisation platform, not an emulator. It cannot be used to run images from one architecture on another (AMD64 on ARM or vice versa). You need a matching image (or install the ARM version directly on the PI, if there is one).

I'am fassing the same problem here and this one helped me. Using Rust who's an programming language for systems might help you find the solution.

https://github.com/ContainerSolutions/trow/tree/main/docker

This link contain a Dockerfile for armv7.

You can run docker images across platforms with QEMU, which is an emulator.

Docs: https://dbhi.github.io/qus/

Docker images: https://github.com/multiarch/qemu-user-static

You can run QEMU with one of the images maintained at the above link with something like:

docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

Which should then allow you to run your x86 images, eg:

docker run --rm -t i386/ubuntu uname -m

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM