Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Raspberry-pi docker error: standard_init_linux.go:178: exec user process caused "exec format error"

I've installed docker in rapsbian according to the official instructions (i.e., running curl -sSL https://get.docker.com | sh) but I'm not able to run the hello-world example (I've also tried other examples without success). This is the error I'm getting:

pi@raspberrypi2:~ $ docker run hello-world
standard_init_linux.go:178: exec user process caused "exec format error"

My environment is Raspberry Pi 2 Model B with Raspbian GNU/Linux 8 (jessie) and Docker version 17.03.0-ce, build 60ccb22.

Any hint about the problem or possible directions to solve the problem?

Many thanks!

like image 346
Pablo EM Avatar asked Mar 19 '17 10:03

Pablo EM


2 Answers

Raspberries use ARM and not x86_64 processors. You can only run images created for that architecture. Try searching for ARM or ARMv7 on docker hub. There is a Debian image for ARM I know of but there must be others as well.

The underlying issue is that the binary format used by ARM is not compatible with x86_64, which is the architecture used by most desktop and server systems.

like image 103
Peter Gerber Avatar answered Oct 07 '22 19:10

Peter Gerber


Add to the beginning of your file:

#!/bin/bash 

It works for me

like image 21
Kairat Koibagarov Avatar answered Oct 07 '22 19:10

Kairat Koibagarov