nexdrew / rekcod

docker inspect :mag: → docker run :runner:
ISC License
371 stars 32 forks source link

getting: "exec format error" #68

Open realjax opened 4 years ago

realjax commented 4 years ago

When running this

docker run --rm -v /var/run/docker.sock:/var/run/docker.sock nexdrew/rekcod something

the response is:

standard_init_linux.go:211: exec user process caused "exec format error"
nexdrew commented 4 years ago

Are you on an ARM system, by any chance?

Note that the current Docker image for rekcod (nexdrew/rekcod:3.0.0) was built for an amd64 architecture:

$ docker image inspect nexdrew/rekcod:3.0.0 | grep Architecture
        "Architecture": "amd64",

(You'd run into this same problem on a 32 bit system as well.)

If this is the problem, then it sounds like we need to figure out a way to build multi-arch images for rekcod... 🤔

realjax commented 4 years ago

Yes, it was on a raspberry pi 🙂

nexdrew commented 4 years ago

Ok, I've learned a bit from this blog about how to build images for multiple platforms: https://www.docker.com/blog/multi-arch-images/

It essentially boils down to enabling and using the buildx Docker CLI plugin to tap into extended Moby BuildKit features.

I'll give this a shot and let you know how it goes.

nexdrew commented 4 years ago

I successfully pushed a special tag called nexdrew/rekcod:3.0.0arm to Docker Hub that should support a 64 bit (linux/arm64) and a 32 bit (linux/arm/v7) version of ARM.

Give this a shot and let me know how it goes:

docker run --rm -v /var/run/docker.sock:/var/run/docker.sock nexdrew/rekcod:3.0.0arm something
bwims commented 2 years ago

Your arm version worked fine for me, thanks!

May I suggest you add the tag to Docker Hub ?