# Drone + Gitea on a Raspberry Pi 3

**URL:** <https://drone.discourse.group/t/drone-gitea-on-a-raspberry-pi-3/11365>\
**Category:** Drone Support\
**Created:** [March 25, 2018, 4:04pm UTC](https://drone.discourse.group/t/drone-gitea-on-a-raspberry-pi-3/11365 "2018-03-25T16:04:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![NyxCode](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/nyxcode/32/4097_2.png) [@NyxCode](https://drone.discourse.group/u/NyxCode)\
**Post date:** [March 25, 2018, 4:04pm UTC](https://drone.discourse.group/t/drone-gitea-on-a-raspberry-pi-3/11365/1 "2018-03-25T16:04:33Z")

</div>

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/](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](https://github.com/drone/drone/blob/master/BUILDING) 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`

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [March 25, 2018, 4:28pm UTC](https://drone.discourse.group/t/drone-gitea-on-a-raspberry-pi-3/11365/2 "2018-03-25T16:28:55Z")

</div>

sorry I pasted the wrong path:

```diff
-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.

```nohighlight
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](https://golang.org/doc/install)  
[2] [https://golang.org/doc/install#testing](https://golang.org/doc/install#testing)  
[3] [https://golang.org/doc/code.html#Workspaces](https://golang.org/doc/code.html#Workspaces)

---

<div class="post-metadata">

**Author:** ![NyxCode](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/nyxcode/32/4097_2.png) [@NyxCode](https://drone.discourse.group/u/NyxCode)\
**Post date:** [March 25, 2018, 4:53pm UTC](https://drone.discourse.group/t/drone-gitea-on-a-raspberry-pi-3/11365/4 "2018-03-25T16:53:41Z")

</div>

Thanks for your effort. Unfortunatly, I’m still experiencing problems. I believe my folder structure is set up correctly.

```auto
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

```

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [March 25, 2018, 4:55pm UTC](https://drone.discourse.group/t/drone-gitea-on-a-raspberry-pi-3/11365/5 "2018-03-25T16:55:03Z")

</div>

are you running `go build` from inside the repository directory?

---

<div class="post-metadata">

**Author:** ![NyxCode](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/nyxcode/32/4097_2.png) [@NyxCode](https://drone.discourse.group/u/NyxCode)\
**Post date:** [March 25, 2018, 4:55pm UTC](https://drone.discourse.group/t/drone-gitea-on-a-raspberry-pi-3/11365/6 "2018-03-25T16:55:54Z")

</div>

damm - I wasn’t. Now I got it working!  
Thanks for your help!!

---

<div class="post-metadata">

**Author:** ![NyxCode](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/nyxcode/32/4097_2.png) [@NyxCode](https://drone.discourse.group/u/NyxCode)\
**Post date:** [March 25, 2018, 5:25pm UTC](https://drone.discourse.group/t/drone-gitea-on-a-raspberry-pi-3/11365/7 "2018-03-25T17:25:31Z")

</div>

Even though I was able to build drone, when I try to run it it results in this error:

```auto
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:

```auto
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

```

---

<div class="post-metadata">

**Author:** ![NyxCode](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/nyxcode/32/4097_2.png) [@NyxCode](https://drone.discourse.group/u/NyxCode)\
**Post date:** [March 25, 2018, 9:55pm UTC](https://drone.discourse.group/t/drone-gitea-on-a-raspberry-pi-3/11365/8 "2018-03-25T21:55:36Z")

</div>

Update: I have now tried the same thing on my arch-desktop and I got the same error.

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [March 25, 2018, 10:29pm UTC](https://drone.discourse.group/t/drone-gitea-on-a-raspberry-pi-3/11365/9 "2018-03-25T22:29:56Z")

</div>

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.

```nohighlight
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.

```nohighlight
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](https://github.com/drone/drone/issues/1767)

---

<div class="post-metadata">

**Author:** ![NyxCode](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/nyxcode/32/4097_2.png) [@NyxCode](https://drone.discourse.group/u/NyxCode)\
**Post date:** [March 28, 2018, 5:12pm UTC](https://drone.discourse.group/t/drone-gitea-on-a-raspberry-pi-3/11365/10 "2018-03-28T17:12:22Z")

</div>

With the help of atomi, I finally managed to get it runnig. I compiled the server using [this](http://discuss.harness.io/t/how-to-deploy-drone-on-raspberry-pi/1221/4?u=nyxcode) command (thanks @ling7334), created a docker image with `docker build -t nyxcode/drone .` and used [this](https://pastebin.com/nRnK87Zh) `docker-compose.yaml` file.

Thanks for your help @bradrydzewski
