I am trying to do some research for our company since we want to switch to docker.
The Problem now is that i got a local gitlab instance for testing and wanted to try the gitlab ci feature and how i have to configure everything.
I can register a new runner but when running a pipeline it always gets stuck and it seems that gitlab can’t communicate with the runner.
This is my current runner configuration:
check_interval = 0
log_level = "debug"
[session_server]
session_timeout = 1800
[[runners]]
name = "test"
url = "http://gitlab" // the name of the gitlab instance in my docker-compose
token = "xxx"
executor = "docker"
[runners.docker]
tls_verify = false
image = "docker:stable"
privileged = false
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = false
volumes = ["/cache"]
shm_size = 0
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
my docker-compose file:
version: "3"
services:
gitlab:
image: gitlab/gitlab-ce
hostname: "gitlab.local"
volumes:
- ./logs:/var/log/gitlab
- ./gitlab:/var/opt/gitlab
- ./etc/gitlab:/etc/gitlab
labels:
traefik.enable: "true"
traefik.frontend.rule: "Host:gitlab.local"
traefik.network: "traefik"
traefik.backend: "gitlab"
traefik.frontend.entrypoint: "http"
traefik.port: "80"
networks:
- traefik
gitlab-runner:
image: gitlab/gitlab-runner:latest
container_name: gitlab-runner
restart: always
volumes:
- ./runner-config:/etc/gitlab-runner
- /var/run/docker.sock:/var/run/docker.sock
labels:
traefik.enable: "true"
traefik.frontend.rule: "Host:gitlab-runner.local"
traefik.network: "traefik"
traefik.backend: "gitlab-runner"
traefik.frontend.entrypoint: "http"
traefik.port: "80"
networks:
- traefik
networks:
traefik:
external: true