dockerarmdocker-composenanopi

Running docker container on nanoPI leads to "exec format error"


The goal is to run docker containers on my nanoPI in the same manner as on a ubuntu server machine.

I have recently run into the following error when attempting docker run -it kylemanna/openvpn:

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

I also get the same error when executing docker-compose using the container approach

Since I get the problem whether I use docker compose or not, I am starting to think that the error might be my usage of docker on the nanoPI. It may not be supported in the same way.

However, I can execute other containers/images just fine, hello-world, ubuntu, etc.

How do I go about determining the cause of this error? Where is the source code for standard_init_linux.go:185? And, what am I doing incorrectly?


Solution

  • Through trial and error, I discovered that if I rebuilt the openvpn image directly from the github repository on the machine with which the container would be run using (docker build <url>), then this error was resolved for the openvpn container but not (yet) for docker-compose. I imagine rebuilding the docker-compose container will fix the issue with that one too.

    This is most likely due to a binary not having been compiled for the machine type that I was using.

    Source/Inspiration: https://github.com/moby/moby/issues/23865