I have gitlab running on a vm, I have a runner in eks (amazon k8s) connected to my gitlab, provisioned with the operator for k8s. I want to build images but I get an error. My docker-runner, config.toml and the error can be found below:
docker-runner.yml
apiVersion: apps.gitlab.com/v1beta2
kind: Runner
metadata:
namespace: gitlab-runner
name: gitlab-runner
spec:
gitlabUrl: http://gitlab.poc.domain.com/
buildImage: "docker:latest"
token: gitlab-runner-secret
config: custom-config-toml
config.toml
[[runners]]
executor = "kubernetes"
[runners.kubernetes]
image = "docker:latest"
privileged = false
tls_verify = false
disable_cache = false
[[runners.kubernetes.volumes.hostpath]]
name = "docker_sock"
mount_path = "/var/run/docker.sock"
host_path = "/var/run/docker.sock"
[[runners.kubernetes.volumes.hostpath]]
name = "cache"
mount_path = "/cache"
host_path = "/cache"
[[runners.kubernetes.services]]
name = "docker:dind"
[runners.kubernetes.env]
DOCKER_HOST = "tcp://docker:2375"
DOCKER_TLS_CERTDIR = ""
DOCKER_DRIVER = "overlay"
[runners.cache]
Insecure = false
error
Running with gitlab-runner 15.10.1 (dcfb4b66)
on gitlab-runner-runner-66d46bc68-78s42 pjevi1sf, system ID: r_UiGKWIXoDc6G
Preparing the "kubernetes" executor
00:00
Using Kubernetes namespace: gitlab-runner
Using Kubernetes executor with image docker:latest ...
Using attach strategy to execute scripts...
Preparing environment
00:07
Waiting for pod gitlab-runner/runner-pjevi1sf-project-4-concurrent-0mkgzt to be running, status is Pending
Waiting for pod gitlab-runner/runner-pjevi1sf-project-4-concurrent-0mkgzt to be running, status is Pending
ContainersNotReady: "containers with unready status: [build helper svc-0]"
ContainersNotReady: "containers with unready status: [build helper svc-0]"
Running on runner-pjevi1sf-project-4-concurrent-0mkgzt via gitlab-runner-runner-66d46bc68-78s42...
Getting source from Git repository
00:01
Fetching changes with git depth set to 20...
Initialized empty Git repository in /builds/test/test-image-builder/.git/
Created fresh repository.
Checking out 873eb681 as detached HEAD (ref is main)...
Skipping Git submodules setup
Executing "step_script" stage of the job script
$ until docker info; do sleep 1; done
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.10.4
Path: /usr/local/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.17.2
Path: /usr/local/libexec/docker/cli-plugins/docker-compose
Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info
I don’t want TLS or anything fancy, I’m still on the POC phase.