I have a Docker image that was built and uploaded to Amazon ECR by a x86 machine.
I’m trying to run this image on an ARM machine; however, I’m getting the following:
$sudo docker run 1b3ed34937e8
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
Do I need to rebuild this image? Is it possible to rebuild with only an image and not a dockerfile?
2
Answers
You are trying to build x86 Docker images on a different architecture (ARM).
Rebuild the images on the Mac, or if you are still building the image on X86 you can set the target platform
You can also use the emulation-layer built into docker:
Since this is based on emulation it will not be as performant as running the container using the host architecture.