Установка Runners в Docker

Контейнер

version: "3.7" services: service: runner: image: 'gitlab/gitlab-runner:latest' container_name: gitlab-runner restart: always volumes: - 'gitlab-runner:/etc/gitlab-runner' - '/var/run/docker.sock:/var/run/docker.sock' networks: localnetwork: ipv4_address: "192.168.1.5"

На хост машине

$ sudo usermod -aG docker gitlab-runner

В контейнере

$ apt update && \ apt install ca-certificates curl gnupg lsb-release -y && \ mkdir -p /etc/apt/keyrings && \ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \ apt update && \ apt install docker-ce-cli -y

Документация

https://habr.com/ru/articles/335564/