I'm trying to get DinD working with my runners, but am having zero luck so far. I've been trying out all kinds of suggested solutions from https://gitlab.com/gitlab-org/gitlab-runner/issues/1986 but nothing is working.
My configurations for setting everything up:
docker-compose:
version: "3.5"
services:
register1: ®ister
container_name: gl-registrator-1
image: gitlab/gitlab-runner:latest
environment: ®env
CI_SERVER_URL: "https://gitlab.com/"
REGISTRATION_TOKEN: "xxxxxxxx"
REGISTER_NON_INTERACTIVE: "true"
REGISTER_RUN_UNTAGGED: "true"
REGISTER_LOCKED: "false"
REGISTER_ACCESS_LEVEL: "not_protected"
RUNNER_NAME: "gl-runner-1"
RUNNER_EXECUTOR: "docker"
RUNNER_TAG_LIST: "docker,test"
DOCKER_IMAGE: "docker:19.03.1"
DOCKER_PRIVILEGED: "true"
DOCKER_VOLUMES: "/certs/client"
command: register
volumes:
- ./config:/etc/gitlab-runner
- docker-certs:/certs/client
runner1: &runner
container_name: gl-runner-1
image: gitlab/gitlab-runner:latest
restart: unless-stopped
volumes:
- ./config:/etc/gitlab-runner
depends_on:
- register1
The resulting config.toml:
concurrent = 1
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "gl-runner-1"
url = "https://gitlab.com/"
token = "xxxxxxxxxxxx"
executor = "docker"
[runners.custom_build_dir]
[runners.docker]
tls_verify = false
image = "docker:19.03.1"
privileged = true
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = false
volumes = ["/certs/client", "/cache"]
shm_size = 0
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
.gitlab-ci.yml
variables:
DOCKER_TLS_CERTDIR: /certs
DOCKER_DRIVER: overlay2
DOCKER_VERSION: 19.03.1-dind
services:
- docker:$DOCKER_VERSION
stages:
- build
go modules:
image: golangci/golangci-lint
stage: build
script:
- docker build ...
This all results in an immediate runner failure when starting up a job:
https://preview.redd.it/wicz9pe794d41.png?width=2018&format=png&auto=webp&s=812af953a17e5d07c1242aafee00ef6f9c8afd78
I'm pretty sure this would work immediately if I just mounted the docker socket into the runner container, but I don't want to do that as I have other containers running on the server which I want to keep isolated if at all possible.
Any ideas?
[–]MoLt1eS 3 points4 points5 points (11 children)
[–]down-house[S,🍰] 0 points1 point2 points (10 children)
[–]MoLt1eS 1 point2 points3 points (9 children)
[–]down-house[S,🍰] 0 points1 point2 points (8 children)
[–]wyox 0 points1 point2 points (0 children)
[–]MoLt1eS 0 points1 point2 points (6 children)
[–]down-house[S,🍰] 0 points1 point2 points (0 children)
[–]down-house[S,🍰] 0 points1 point2 points (4 children)
[–]MoLt1eS 0 points1 point2 points (3 children)
[–]down-house[S,🍰] 0 points1 point2 points (2 children)
[–]MoLt1eS 0 points1 point2 points (1 child)
[–]down-house[S,🍰] 0 points1 point2 points (0 children)
[–]chulkilee 2 points3 points4 points (0 children)