遇到的问题为:
1
2
3
4
5
|
1 Initialized empty Git repository in /drone/src/.git/
5s
2 + git fetch origin +refs/heads/master:
5s
3 fatal: could not read Username for 'http://192.168.120.181:13080': terminal prompts disabled
|
出现下载又失败的问题,根据昨晚干了一晚上无用功,今天决定从版本入手,把 drone 版本将为 1.0 进行编译,结果 clone 成功了,如下图所示
再接再厉,可能因为版本的问题,以后还是少用 latest,
改用版本为:drone:2.0,依然可以,最后使用自己编译的 drone 版本,保证可以使用。
总结:
版本稳定一定很大。
个人 docker-compose-drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
version: "3.5"
services:
drone:
image: huangxiaofenglogin/drone:2.1.0 #不要用latest,latest并非稳定版本
ports:
- "7000:80"
networks:
- drone
volumes:
- /data/drone/:/var/lib/drone/:rw
- /var/run/docker.sock:/var/run/docker.sock:rw
environment:
#- "DB_PASSWD_FILE=/run/secrets/db_passwd"
- DRONE_OPEN=true
- DRONE_DEBUG=true
- DRONE_DATABASE_DATASOURCE=root:root@tcp(ip:3306)/drone?parseTime=true #mysql配置,要与上边mysql容器中的配置一致
- DRONE_DATABASE_DRIVER=mysql
- DRONE_GITLAB_CLIENT_ID=123
- DRONE_GITLAB_CLIENT_SECRET=456
- DRONE_GITLAB_SERVER=http://git.tool.mybns.cn
- DRONE_TLS_AUTOCERT=false
- DRONE_GIT_ALWAYS_AUTH=false
- DRONE_RUNNER_CAPACITY=2
- DRONE_RPC_SECRET=123 #RPC秘钥
- DRONE_SERVER_PROTO=http #这个配置决定了你激活时仓库中的webhook地址的proto
- DRONE_SERVER_HOST=ip:7000
- DRONE_USER_CREATE=username:root,admin:true #管理员账号,是你想要作为管理员的Gitea用户名
- DRONE_USER_FILTER=
- DRONE_DATADOG_ENABLE=false
- DRONE_AGENTS_DISABLED=true
- DRONE_GITLAB_GIT_USERNAME= root
- DRONE_GITLAB_GIT_PASSWORD=12345678
# deploy:
# mode: replicated
# replicas: 1
# placement:
# constraints: [node.role == manager]
# restart_policy:
# condition: on-failure
# delay: 5s
# max_attempts: 3
# window: 120s
drone-runner:
image: drone/drone-runner-docker:latest
networks:
- drone
depends_on:
- drone
volumes:
- /var/run/docker.sock:/var/run/docker.sock:rw
environment:
- DRONE_RPC_HOST=ip:7000
- DRONE_RPC_SECRET=123
- DRONE_RPC_PROTO=http
- DRONE_RUNNER_CAPACITY=2
- DRONE_DEBUG=true
- DRONE_LOGS_DEBUG=true
- DRONE_LOGS_PRETTY=true
- DRONE_LOGS_NOCOLOR=false
- DRONE_RUNNER_NETWORKS=drone_network
# deploy:
# mode: replicated
# replicas: 1
# placement:
# constraints: [node.role == manager]
# restart_policy:
# condition: on-failure
# delay: 5s
# max_attempts: 3
# window: 120s
networks:
drone:
name: drone_network
|