https://www.aliyun.com/jiaocheng/123155.html?spm=5176.100033.2.5.EIV4p6html
- drone的服務須要配置DRONE_ADMIN環境變量,值是Gogs的用戶名,以','隔開
services:
drone-server:
image: drone/drone:latest
ports:
- 8000:8000
volumes:
- /var/lib/drone:/var/lib/drone/
restart: always
environment:
- DRONE_ADMIN=admin-dev,test
- DRONE_OPEN=true
- DRONE_HOST=http://192.168.2.12:8000
- DRONE_GOGS=true
- DRONE_GOGS_URL=http://192.168.2.12:3000
- DRONE_SECRET="Bearer"
- DRONE_GOGS_SKIP_VERIFY=true
在drone項目的設置參數中啓用'Trusted'開關
添加'privileged: true'到drone.yml文件
workspace:
path: /dronebuild
pipeline:
build:
image: ubuntu:latest
privileged: true
commands:
- /bin/bash 以上是
DroneCI啓用privilegedubuntu