Concepts
- Runner is an application that works with GitLab CI/CD to run jobs in a pipline.
- Runner can run multiple jobs and use multiple tokens with multiple servers.
- An executor determines the environment each job runs in.
- Jobs will be executed by executor in different platforms: Local, Docker, Docker with SSH, remote ssh server
- When you install GitLab Runner in a Docker container and choose the Docker executor to run your jobs, it’s sometimes referred to as a
“Docker-in-Docker”
configuration. - Specify the name of the runner or its tags in your
.gitlab-ci.yml
file. Then, when you commit to your repository, the pipeline runs, and the runner’s executor processes the commands.
Docker in Docker configuration
Run GitLab Runner in a container
- You could use system volume mounts to start the Runner container note: On macOS, use /Users/Shared instead of /srv .
1
2
3
4docker run -d --name gitlab-runner --restart always \
-v /srv/gitlab-runner/config:/etc/gitlab-runner \
-v /var/run/docker.sock:/var/run/docker.sock \
gitlab/gitlab-runner:latest