Skip to content
This repository has been archived by the owner on Jan 2, 2018. It is now read-only.

standard_init_linux.go:178: exec user process caused "exec format error" #1

Closed
yangxuan8282 opened this issue Mar 12, 2017 · 3 comments

Comments

@yangxuan8282
Copy link

I'm trying to run this on a x86_64 linux machine, since the README says:

You are able to run this Docker image in Docker for Mac/Windows.

I guess it should works for x64 linux, but failed:

docker build -t test-qemu .
Sending build context to Docker daemon 2.048 kB
Step 1/2 : FROM hypriot/rpi-alpine:3.4
3.4: Pulling from hypriot/rpi-alpine
441134fbd8aa: Already exists 
1129e39aaff0: Already exists 
Digest: sha256:39a9956bace10b1368089390aa09861da2d097f75cf354af635ae726c615a793
Status: Downloaded newer image for hypriot/rpi-alpine:3.4
 ---> 882059b7ca70
Step 2/2 : RUN apk add --no-cache bash
 ---> Running in 1601e023cfc3
standard_init_linux.go:178: exec user process caused "exec format error"
The command '/bin/sh -c apk add --no-cache bash' returned a non-zero code: 1

here is my Dockerfile:

FROM hypriot/rpi-alpine:3.4

RUN apk add --no-cache bash

If I misunderstanding the usage of this docker image? I think it should be used for build an alpine based docker image for raspberry pi on x64.

@firecyberice
Copy link
Member

For use with Linux you need qemu installed on the host. Have a look at this to register qemu in the kernel of the host system for crossbuilding a docker image for arm.

@yangxuan8282
Copy link
Author

@firecyberice sorry for late reply

it works

should we run

docker run --rm --privileged multiarch/qemu-user-static:register --reset

again after reboot?

@yangxuan8282
Copy link
Author

yangxuan8282 commented Apr 4, 2017

after register qemu in the kernel of the host system, the drone docker plugins seems can't pass DOCKER_USERNAME && DOCKER_PASSWORD, I'm not sure whether it's related, have you ever got this issues?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants