Skip to main content

Install GitLab Runner with Docker

Prequisites

Steps

  1. Update docker-compose.yaml file with the following content:
  gitlab-runner:
image: 'gitlab/gitlab-runner:latest'
container_name: gitlab-runner
restart: always
depends_on:
- gitlab
volumes:
- '/opt/gitlab-runner/config:/etc/gitlab-runner'
- '/var/run/docker.sock:/var/run/docker.sock'
networks:
- gitlab-network
  1. Drop container with docker compose down and start again with docker compose up -d

  2. Access to GitLab and navigate to Admin area > CI/CD > Runner

runner-config

  1. Fill the information for your runner and click Create Runner button

  2. Copy command line and run it with docker compose -rm <your-command> alt text

  3. After verify success, it will show you Active status runner-3