title: How to setup gitlab-runner to run docker command into gitlab-ci?
body: <p>I try to configure gitlab runner in order to uses docker command into my <code>.gitlab-ci.yml</code> file.</p>
  <p>I have run 2 containers to do that :</p>
  <ul>
  <li><code>gitlab/gitlab-ce:latest</code></li>
  <li><code>gitlab/gitlab-runner:alpine</code></li>
  </ul>
  <p>I have set my registered runner with privilege mode :</p>
  <pre class="lang-toml prettyprint-override"><code>[[runners]]
    name = &quot;first runner&quot;
    url = &quot;http://my.domain.com:8484/&quot;
    token = &quot;mySecretToken&quot;
    executor = &quot;docker&quot;
    clone_url = &quot;http://my.domain.com:8484/&quot;
    [runners.custom_build_dir]
    [runners.cache]
      [runners.cache.s3]
      [runners.cache.gcs]
      [runners.cache.azure]
    [runners.docker]
      tls_verify = false
      image = &quot;node:lts-alpine&quot;
      privileged = true
      disable_entrypoint_overwrite = false
      oom_kill_disable = false
      disable_cache = false
      volumes = [&quot;/cache&quot;]
      shm_size = 0
  </code></pre>
  <p>My pipeline work fine to build and run tests. Now i want to build nginx docker container with my node builded files.</p>
  <p>When i just run <code>docker version</code> command, there was an error :</p>
  <pre><code>$ docker version
  Client: Docker Engine - Community
   Version:           20.10.1
   API version:       1.41
   Go version:        go1.13.15
   Git commit:        831ebea
   Built:             Tue Dec 15 04:28:35 2020
   OS/Arch:           linux/amd64
   Context:           default
   Experimental:      true
  error during connect: Get http://docker:2375/v1.24/version: dial tcp: lookup docker on 8.8.8.8:53: no such host
  ERROR: Job failed: exit code 1
  </code></pre>
  <p>Maybe it's an error into my <code>.gitlab-ci.yml</code> :</p>
  <pre class="lang-yaml prettyprint-override"><code>services:
    - name: docker:dind
  
  stages:
      - construction
  
  variables:
    DOCKER_HOST: tcp://docker:2375/
    DOCKER_DRIVER: overlay2
    # See https://github.com/docker-library/docker/pull/166
    DOCKER_TLS_CERTDIR: &quot;&quot;
  
  deploiement:
    stage: construction
    image: docker:latest
    before_script:
      - docker version
    script:
      - echo &quot;test&quot;
  </code></pre>
  <p><strong>How can i configure my runner to execute docker commands ? Is my runner setup wrong</strong> ?</p>
  <p>Thanks for your answers !</p>