Building drone 8.5 into a container fails with "no such file or directory"
The problem with your build is that you're not building a binary that can be executed inside the docker container, hence the exec user process
error.
The quick fix for your issue would be to add cross-compilation flags to your go install
. This will also result in the binary being placed in a slightly different location so your build file will look like this:
GOOS=linux GOARCH=386 go install github.com/drone/drone/cmd/drone-agentGOOS=linux GOARCH=386 go install github.com/drone/drone/cmd/drone-servermkdir releasecp $GOPATH/bin/linux_386/drone-server release/drone-server
The proper (and more complicated) way to adress this would be to use a multi-stage Dockerfile with a build step first, see e.g. this blog post with an example.