<p>I've added:</p>

<pre><code>services:
 - docker:dind
</code></pre>

<p>to my .gitlab-ci.yaml file, however it still does not seem to have the docker daemon running. Is additional configuration required?</p>

<p>I'm using the Gitlab Runner on Kubernetes - installed directly via the Gitlab web interface / admin.</p>

<pre><code>image: docker:latest
services:
  - docker:dind
stages:
  - build
  - deploy

build-web:
  stage: build
  script:
    - docker info
  only:
    - master

deploy-web:
  stage: deploy
  script:
    - docker info
    - exit 1
  only:
    - master
</code></pre>

<p>Build output:</p>

<pre><code>Running with gitlab-runner 12.2.0 (a987417a)
  on runner-gitlab-runner-857c466884-kzql9 BB7a6A8L
Using Kubernetes namespace: gitlab-managed-apps
Using Kubernetes executor with image docker:latest ...
Waiting for pod gitlab-managed-apps/runner-bb7a6a8l-project-1-concurrent-0prm8w to be running, status is Pending
Waiting for pod gitlab-managed-apps/runner-bb7a6a8l-project-1-concurrent-0prm8w to be running, status is Pending
Running on runner-bb7a6a8l-project-1-concurrent-0prm8w via runner-gitlab-runner-857c466884-kzql9...
Fetching changes with git depth set to 50...
Initialized empty Git repository in /builds/root/cinema/.git/
Created fresh repository.
From http://mygitlab.ddns.net/root/cinema
 * [new branch]      master     -&gt; origin/master
Checking out e138a25e as master...

Skipping Git submodules setup
$ docker info
Client:
 Debug Mode: false

Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info
ERROR: Job failed: command terminated with exit code 1
</code></pre>

<hr>

<p>I see the following config in the gitlab runner pod:</p>

<pre><code>bash-4.4$ cat .gitlab-runner/config.toml 
listen_address = "[::]:9252"
concurrent = 4
check_interval = 3
log_level = "info"

[session_server]
  session_timeout = 1800

[[runners]]
  name = "runner-gitlab-runner-857c466884-kzql9"
  request_concurrency = 1
  url = "http://mygitlab.ddns.net/"
  token = "BB7a6A8LRvZ4Y-9KsLvj"
  executor = "kubernetes"
  [runners.custom_build_dir]
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]
  [runners.kubernetes]
    host = ""
    bearer_token_overwrite_allowed = false
    image = "ubuntu:16.04"
    namespace = "gitlab-managed-apps"
    namespace_overwrite_allowed = ""
    privileged = true
    service_account_overwrite_allowed = ""
    pod_annotations_overwrite_allowed = ""
    [runners.kubernetes.pod_security_context]
    [runners.kubernetes.volumes]
</code></pre>

Chris Stryczynski
<p><strong>Warning: The below might not be 100% secure</strong></p>

<p>Seems to be the issue mentioned here: <a href="https://gitlab.com/gitlab-org/gitlab-runner/issues/4501" rel="nofollow noreferrer">https://gitlab.com/gitlab-org/gitlab-runner/issues/4501</a></p>

<p>A workaround is provided here: <a href="https://gitlab.com/gitlab-org/gitlab-runner/issues/4501#note_194648457" rel="nofollow noreferrer">https://gitlab.com/gitlab-org/gitlab-runner/issues/4501#note_194648457</a></p>

<p>Essentially set the following:</p>

<pre><code># .gitlab-ci.yml
variables:
  DOCKER_TLS_CERTDIR: ""
</code></pre>
