首先,我下载了无人机图片:
std::vector
第二,我为手臂构建了图像:
go get github.com/drone/drone/cmd/...
之后,我为docker构建了映像:
GOARM=7 go build -o release/drone-server github.com/drone/drone/cmd/drone-server
docker文件如下所示:
docker -f ./go-workspace/src/github.com/drone/drone/Dockerfile build -t drone/drone .
那是我的docker-compose.yml:
# docker build --rm -t drone/drone .
FROM drone/ca-certs
EXPOSE 8000 9000 80 443
ENV DATABASE_DRIVER=sqlite3
ENV DATABASE_CONFIG=/var/lib/drone/drone.sqlite
ENV GODEBUG=netdns=go
ENV XDG_CACHE_HOME /var/lib/drone
ADD release/drone-server /bin/
ENTRYPOINT ["/bin/drone-server"]
agent.env文件:
version: '2'
services:
drone-server:
image: drone/drone:latest
ports:
- 8000:8000
- 9000:9000
volumes:
- /var/lib/drone:/var/lib/drone
restart: always
env_file:
- /etc/drone/server.env
drone-agent:
image: drone/agent:linux-arm
command: agent
depends_on:
- drone-server
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: always
env_file:
- /etc/drone/agent.env
server.env文件:
DRONE_SECRET=xxx
DRONE_SERVER=[server-hostname]:9000
DOCKER_ARCH=arm
但是,在运行# Service settings
DRONE_SECRET=xxx
DRONE_HOST=https://[server-hostname]/drone
DRONE_OPEN=false
DRONE_GOGS=true
DRONE_GOGS_URL=https://[server-hostname]/git
DRONE_GOGS_PRIVATE_MODE=true
时,出现以下错误:
docker-compose -f /etc/drone/docker-compose.yml up
无人机服务器退出并显示代码1。
我将Apache配置为通过代理访问无人机,如此处所述:http://readme.drone.io/0.5/install/setup/apache/
感谢您的帮助。