GitLab allows you to host your own runners to process CI/CD jobs. You can either configure your own local machine or a remote cloud server to run CI/CD jobs but they both come with costs. Running on cloud generates bills while running on your own machine requires to install extra dependencies.
Set up runners in Docker
Docker provides an isolated environment for running containers. You can keep runners on your local machine without any spending, and additionally, it offloads dependency management from you. With Docker containers, you can create/destroy runners without the need to clean up any aftermath.
Quick Start
Before we start, if you have any detailed questions, refer to this official document on GitLab: https://docs.gitlab.com/runner/install/docker/#install-the-docker-image-and-start-the-container .
Let's begin!
Register your runner using volume mounts
docker volume create gitlab-runner-config
docker run -it \ -v /var/run/docker.sock:/var/run/docker.sock \ -v…