共计 1007 个字符,预计需要花费 3 分钟才能阅读完成。
root@k3s-128:~/docker-runner# cat docker-compose.yml
version: "3"
services:
gitrunner:
image: 'gitlab/gitlab-runner:latest'
container_name: "gitlab-runner"
restart: always
volumes:
- './config:/etc/gitlab-runner'
- './cache:/tmp/cache'
- './ssl:/etc/gitlab-runner/certs/'
- '/usr/bin/docker:/usr/bin/docker'
- '/var/run/docker.sock:/var/run/docker.sock'
root@k3s-128:~/docker-runner# cat ./config/config.toml
concurrent = 1
check_interval = 0
shutdown_timeout = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "docker-dev"
url = "https://gitlab.study-k8s.top/"
id = 13
token = "gitlab-token" # 这里替换成 gitlab 项目 token
token_obtained_at = 2023-10-17T15:45:11Z
token_expires_at = 0001-01-01T00:00:00Z
executor = "docker"
[runners.cache]
MaxUploadedArchiveSize = 0
[runners.docker]
tls_verify = false
image = "deeplythink/docker:latest" # 默认镜像地址
privileged = true
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = false
volumes = ["/cache","/var/run/docker.sock:/var/run/docker.sock"] # 挂载 docker socket,这个一定要加,很重要
shm_size = 0
正文完