Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error starting up on Raspberry Pi 3 #51

Closed
sergeifilippov opened this issue Jul 27, 2017 · 10 comments
Closed

Error starting up on Raspberry Pi 3 #51

sergeifilippov opened this issue Jul 27, 2017 · 10 comments

Comments

@sergeifilippov
Copy link

I'm trying to run the docker image on a Raspberry Pi 3 but docker run and docker build both fail with:

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

System details

$ lsb_release -a
Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 8.0 (jessie)
Release:	8.0
Codename:	jessie
$ uname -a
Linux aloy 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux

Errors during docker build

On running docker build -t unifi-controller-arm:0.0.1 ./Dockerfile I get the following error:

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

Removing intermediate container ee2097b6333a
Step 5/19 : RUN echo "deb http://deb.debian.org/debian/ jessie-backports main" > /etc/apt/sources.list.d/10backports.list &&   echo "deb http://www.ubnt.com/downloads/unifi/debian unifi5 ubiquiti" > /etc/apt/sources.list.d/20ubiquiti.list &&   apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50
 ---> Running in 92d58b1e9a16
standard_init_linux.go:178: exec user process caused "exec format error"
The command '/bin/sh -c echo "deb http://deb.debian.org/debian/ jessie-backports main" > /etc/apt/sources.list.d/10backports.list &&   echo "deb http://www.ubnt.com/downloads/unifi/debian unifi5 ubiquiti" > /etc/apt/sources.list.d/20ubiquiti.list &&   apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50' returned a non-zero code: 1

Any ideas?

@jacobalberty
Copy link
Owner

jacobalberty commented Jul 28, 2017

The image is built on amd64, at this time docker hub does not support arm so it would be unable to run on raspberry pi.

You might be able to build it on raspberry by changing the FROM line to match an arm image pi but I don't have a working raspberry pi to test building on at the moment.

@sergeifilippov
Copy link
Author

Makes sense. But is there anything recommend I can look into to see if I can fix it up and get running on arm?

I'm more than happy to build the image myself on arm, just need to get past this error. 😄

@jcberthon
Copy link

Hi @jacobalberty

Docker hub supports ARM images (see for instance this group: https://hub.docker.com/u/armhf/) and recently Docker got better support for multi-arch images (see https://developer.ibm.com/linuxonpower/2017/07/27/create-multi-architecture-docker-image/). It is still some extra effort in building such an image, but then the same image can be used for different architecture (AFAIU there is one image for amd64, one for arm and another one with just the manifest and the pointers to the other images.).

@jacobalberty
Copy link
Owner

@jcberthon docker hub only supports pre built arm images, I lack an arm system to build them on. At the very least i'd have to get docker running under an arm emulator to build those images.

@jacobalberty
Copy link
Owner

alternatively https://resin.io/blog/building-arm-containers-on-any-x86-machine-even-dockerhub/ something like that might work to build on the hub...

@jacobalberty
Copy link
Owner

@sergeifilippov try the beta branch and change FROM debian:jessie-slim to FROM arm32v7/debian:jessie-slim then use docker build
the beta branch currently builds to 5.5.20 but you can specify a different version by adding --build-arg PKGURL=https://dl.ubnt.com/unifi/5.4.19/unifi_sysvinit_all.deb to your build command for example to get version 5.4.19

@jacobalberty
Copy link
Owner

@sergeifilippov oh you would also need to comment out the ENTRYPOINT ["/usr/bin/dumb-init", "--"] line as that is not going to be a compatible binary

@jacobalberty
Copy link
Owner

jacobalberty commented Aug 2, 2017

Alternatively try building the new arm32v7-beta branch it might work

@jacobalberty
Copy link
Owner

@sergeifilippov and just to overload you with options you could try jacobalberty/unifi:arm32v7-beta on the docker hub, its running unifi 5.5.20, if I can get a decent build going with the cross compile I may start tagging out regular releases from it. I have no way to test it at the moment though, I'll see if I can get qemu going to test it in in a few hours.

@sergeifilippov
Copy link
Author

Thanks everyone! I was able to run it on my RPI3 using ryansch/unifi-rpi:5.4.1.9

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

No branches or pull requests

3 participants