通过研究发现runner的缓存文件存放在:/var/lib/docker/volumes/下以runner-{runnerid}-开头的文件夹中, 每个项目的缓存存放方式:runner-{runnerid}-projects-{projectid}-concurrent-{num}-cache-3c3f060a0374fc8bc39395164f415a70|c33bcaa1fd2c77edfc3893b41966cea8 以3c3f060a0374fc8bc39395164f415a70结尾的文件...
vim /etc/gitlab-runner/config.toml [[runners]]name="docker"url="xxx"id=10token="xxx"token_obtained_at=2023-04-19T04:28:16Z token_expires_at=0001-01-01T00:00:00Z executor="docker"[runners.cache]MaxUploadedArchiveSize=0[runners.docker]tls_verify=falseimage="ubuntu:20.04"privileged=falsedi...
- /home/runner/config:/etc/gitlab-runner #容器与宿主机runner配置文件挂载,防止容器重启或者recreate数据丢失,这个很重要。 - /var/run/docker.sock:/var/run/docker.sock #用于runner容器共享宿主机的docker,不然在runner容器里起容器端口挂载就会有问题了。解决Docker in Docker的问题。 1. 2. 3. 4. 5. ...
Available since GitLab Runner 12.9. Workflow The Docker executor divides the job into multiple steps: Prepare: Create and start the services. Pre-job: Clone, restore cache and download artifacts from previous stages. This is run on a special Docker image. Job: User build. This is run on ...
[runners.cache.azure] [[runners]] name = "oa" url = "http://192.168.187.171:82" token = "SQmpTxW6VXyPNFU8wcod" executor = "shell" [runners.custom_build_dir] [runners.cache] [runners.cache.s3] [runners.cache.gcs] [runners.cache.azure] ...
.├── data │ ├── cache │ ├── config │ └── ssl │ └── xx.xx.com.crt └── docker-compose.yaml 创建runner容器 代码语言:javascript 代码运行次数:0 运行 AI代码解释 docker-compose up -d 注册runner Gitlab Runner 有 3 种级别 全局共享 因为executor 使用的是容器,不是 shel...
executor = "docker" [runners.custom_build_dir] [runners.cache] [runners.cache.s3] ...
1. executor,使用docker。 2. 通过docker-image指定一个docker镜像。这里使用的是docker:latest。 3. 通过docker-volumns挂载本地目录: 挂载docker.sock是为了docker:latest镜像操控runner服务器的docker服务; 挂载.m2文件夹,是为了避免maven每次编译项目时都重新下载jar包。(后面.gitlab-ci.yml文件中使用了maven镜像)...
Runs on a special Docker image. Job: Runs your build in the Docker image you configure for the runner. Post-job: Create cache, upload artifacts to GitLab. Runs on a special Docker Image. Supported configurations The Docker executor supports the following configurations. For known issues and ...