Hey!
Until now, I have been using Travic for CI which was easy to install, even on my raspberry pi 3. Now, I’m struggling with the installation of drone which i plan on using with gitea. The already confusing installation instructions on http://docs.drone.io/installation/ don’t seem to work on arm. Has anyone already installed drone on a pi? I’d appreciate some help 
Best regards
[EDIT 1]
I did go get -u github.com/drone/drone
and followed these instructions, but I’m still don’t know how to continue
[EDIT 2]
I tried to create a docker image with cd ~/go/src/github.com/drone/drone && docker build .
, but step Step 7/8 : ADD release/drone-server /bin/
failed with ADD failed: stat /var/lib/docker/tmp/docker-builder219367492/release/drone-server: no such file or directory
sorry I pasted the wrong path:
-go build -o release/drone-server github.com/drone/drone/extras/cmd/drone-server
+go build -o release/drone-server github.com/drone/drone/cmd/drone-server
docker build -t drone/drone .
Note that the build instructions assume you have installed [1] and configured [2] Go and you have a basic understanding of the Go folder structure [3], since Go project need to be cloned to a specific location inside the GOPATH.
git cone https://github.com/drone/drone.git $GOPATH/src/github.com/drone/drone
cd $GOPATH/src/github.com/drone/drone
go build -o release/drone-server github.com/drone/drone/cmd/drone-server
docker build -t drone/drone .
[1] https://golang.org/doc/install
[2] https://golang.org/doc/install#testing
[3] https://golang.org/doc/code.html#Workspaces
1 Like
Thanks for your effort. Unfortunatly, I’m still experiencing problems. I believe my folder structure is set up correctly.
pi@raspberrypi:~ $ go build -o release/drone-server github.com/drone/drone/cmd/drone-server
pi@raspberrypi:~ $ cd ~/go/src/github.com/drone/drone
pi@raspberrypi:~/go/src/github.com/drone/drone $ docker build -t drone/drone .
Sending build context to Docker daemon 3.072kB
Step 1/8 : FROM drone/ca-certs
---> d01bfa3b7007
Step 2/8 : EXPOSE 8000 9000 80 443
---> Using cache
---> 0862aa65ef8c
Step 3/8 : ENV DATABASE_DRIVER=sqlite3
---> Using cache
---> 8442ddd8ede7
Step 4/8 : ENV DATABASE_CONFIG=/var/lib/drone/drone.sqlite
---> Using cache
---> 1d9ba8ec759e
Step 5/8 : ENV GODEBUG=netdns=go
---> Using cache
---> 705fcd99f4f3
Step 6/8 : ENV XDG_CACHE_HOME /var/lib/drone
---> Using cache
---> 7dc20f08985e
Step 7/8 : ADD release/drone-server /bin/
ADD failed: stat /var/lib/docker/tmp/docker-builder104850037/release/drone-server: no such file or directory
are you running go build
from inside the repository directory?
damm - I wasn’t. Now I got it working!
Thanks for your help!!
Even though I was able to build drone, when I try to run it it results in this error:
pi@raspberrypi:~ $ docker run drone/drone
standard_init_linux.go:190: exec user process caused "no such file or directory"
When I use docker-compose, I get a similiar error:
pi@raspberrypi:~/go/src/github.com/drone/drone $ docker-compose up
WARNING: The DRONE_SECRET variable is not set. Defaulting to a blank string.
WARNING: The DRONE_HOST variable is not set. Defaulting to a blank string.
WARNING: The DRONE_GITHUB_CLIENT variable is not set. Defaulting to a blank string.
WARNING: The DRONE_GITHUB_SECRET variable is not set. Defaulting to a blank string.
Recreating drone_drone-server_1
Creating drone_drone-agent_1
Attaching to drone_drone-server_1, drone_drone-agent_1
drone-server_1 | standard_init_linux.go:190: exec user process caused "no such file or directory"
drone-agent_1 | standard_init_linux.go:190: exec user process caused "exec format error"
drone_drone-server_1 exited with code 1
drone_drone-agent_1 exited with code 1
Update: I have now tried the same thing on my arch-desktop and I got the same error.
The below error messages tells me that the binary does not exist in your docker container. Or that something is wrong with the custom-built container.
drone-server_1 | standard_init_linux.go:190: exec user process caused "no such file or directory"
The below error messages tell me that the binary in the docker image you are using is not compiled for your target architecture.
drone-agent_1 | standard_init_linux.go:190: exec user process caused "exec format error"
Have you configured your Docker compose file to use your alternate server image and the arm agent image?
I recommend you reach out to some of the folks in this thread that are actively using Drone on arm machines. They will be better suited to answer your questions, and may have pre-built images that you can use https://github.com/drone/drone/issues/1767
1 Like
With the help of atomi, I finally managed to get it runnig. I compiled the server using this command (thanks @ling7334), created a docker image with docker build -t nyxcode/drone .
and used this docker-compose.yaml
file.
Thanks for your help @bradrydzewski