Skip to content

Commit 65f9a89

Browse files
committed
update docker/gitlab.md
1 parent 19356c9 commit 65f9a89

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

docker/gitlab.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,14 +259,14 @@ Start the container as you did originally:
259259
```shell
260260
docker run -d --name gitlab-runner --restart always \
261261
-v /var/run/docker.sock:/var/run/docker.sock \
262-
-v /home/docker/gitlab-runner/config:/etc/gitlab-runner \
262+
-v /home/www/gitlab/gitlab-runner/config:/etc/gitlab-runner \
263263
gitlab/gitlab-runner:latest
264264
```
265265

266266
服务 gitlab-runner 跑起来之后可以注册对应的仓库
267267

268268
```shell
269-
docker run --rm -it -v /home/docker/gitlab-runner/config:/etc/gitlab-runner gitlab/gitlab-runner register
269+
docker run --rm -it -v /home/www/gitlab/gitlab-runner/config:/etc/gitlab-runner gitlab/gitlab-runner register
270270

271271
# Runtime platform arch=amd64 os=linux pid=8 revision=943fc252 version=13.7.0
272272
# Running in system-mode.
@@ -295,13 +295,26 @@ check_interval = 0
295295
session_timeout = 1800
296296

297297
[[runners]]
298-
name = "web"
298+
name = "项目名称"
299299
url = "https://g.xxxxx.cn/"
300-
token = "4xXx_t9aqcWkK5DZHo-W"
300+
token = "xxx-y1vb"
301301
executor = "docker"
302+
302303
[runners.custom_build_dir]
303304
[runners.cache]
304305
[runners.cache.s3]
305306
[runners.cache.gcs]
306307
[runners.cache.azure]
307-
```
308+
[runners.docker]
309+
environment = ['GIT_SSL_NO_VERIFY=true']
310+
tls_verify = false
311+
image = "node:12"
312+
privileged = false
313+
disable_entrypoint_overwrite = false
314+
oom_kill_disable = false
315+
disable_cache = false
316+
volumes = ["/cache"]
317+
shm_size = 0
318+
```
319+
320+
> ⚠️ `token` 是生成的,必须通过 `gitlab-runner` 生成 `token`

0 commit comments

Comments
 (0)