- /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. ...
GitLab Runner can use Docker to run jobs on user provided images. This is possible with the use of Docker executor.
1. 准备镜像 根据gitlab server 的版本pull对应版本的gitlab-runner的镜像,镜像版本号查看地址 // 镜像版本根据自己的gitlab版本而定sudo docker pull gitlab/gitlab-runner:v13.10.0// docker in docker 的镜像,根据本地的docker版本来拉去相应的版本sudo docker pull docker:20.10.5-dind 2. 运行容器 // ...
1.我使用docker运行gitlab runner,所以首先需要创建一个gitlab runner的docker容器 #!/bin/bash docker run \-d \--name xxx-gitlab-runner \--restart always \-v /xxx/config:/etc/gitlab-runner \-v /var/run/docker.sock:/var/run/docker.sock \-v /xxx/gitlab-runner:/home/gitlab-runner \ ...
1.我使用docker运行gitlab runner,所以首先需要创建一个gitlab runner的docker容器 #!/bin/bash docker run \ -d \ --name xxx-gitlab-runner \ --restart always \ -v /xxx/config:/etc/gitlab-runner \ -v /var/run/docker.sock:/var/run/docker.sock \ ...
GitLab Runner是一个开源的项目,用于在GitLab CI/CD中执行作业。它可以在不同的执行环境中运行,包括Docker容器。Docker executor是GitLab Runner的一种执行器,用于在Docker容器中运行作业。 当出现"Docker executor未找到可执行文件"的错误时,可能有以下几个原因: Docker未正确安装:确保在执行GitLab Runner之...
The following sample shows Docker defined as the executor and example configurations. For more information about these values, see Advanced configuration TOML Copy to clipboard concurrent = 4 [[runners]] name = "myRunner" url = "https://gitlab.com/ci" token = "..." executor = "docker"...
For example: If you want your CI/CD job to run PowerShell commands, you might install GitLab Runner on a Windows server and then register a runner that uses the shell executor. If you want your CI/CD job to run commands in a custom Docker container, you might install GitLab Runner on...
# 选择 runner 执行器,通常选择 shell Enter an executor:docker+machine, docker-ssh+machine, custom, docker-windows, docker-ssh, ssh,kubernetes, docker, parallels, shell, virtualbox: > shell # 回车结束,安装gitlab-runner文件夹下会自动生成config.toml ...
executor = "shell" [runners.custom_build_dir] [runners.cache] [runners.cache.s3] [runners.cache.gcs] [runners.cache.azure] [[runners]] name = "docker-runner" url = "https://gitlab.com/" id = 17390576 token = "_nHBeXQVrwj8V-xxq899" ...