When the docker image created on Raspberry pi is read by docker on windows, the error "exec format error" appears.

1 This article

I will explain what to do when the following error occurs when you pull the docker image file generated on Raspberry pi with docker on Windows.

python


standard_init_linux.go:207: exec user process caused "exec format error"

2 What is the cause of the error?

The CPU of Raspberry pi is ARM type, while the CPU of windows type is X86 type. Image files generated by ARM CPUs cannot be pulled on windows running on X86 CPUs.

3 What are the measures?

If you install qemu-user-static on docker running on Windows, it will be generated by ARM system (Raspberry Pi) CPU. Image can be pulled on X86 series (Windows) Docker.

Example


$ uname -m //Display the CPU type of your PC
x86_64

//Make Images created on ARM CPUs work on X86 CPUs
$ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

Recommended Posts

When the docker image created on Raspberry pi is read by docker on windows, the error "exec format error" appears.
The key to running Docker on Raspberry Pi 4 (Ubuntu server 20.04)
Install Docker on Raspberry Pi
Install Docker and docker-compose on Raspberry Pi 4, Linux (Debian) and Windows 10, respectively
Error when npm install on Windows 7
[Docker] How to build when the source code is bind-mounted on the container
[Error] Error during Docker build (solved by pulling the latest version of image)
I installed Docker on my Raspberry Pi 3
Launched Redmine with Docker on Raspberry Pi 3
[Twitter API] Countermeasures when "It is not safe" appears on the https site