title: Cannot connect to the Docker daemon at unix:///var/run/docker.sock in gitlab CI
body: <p>I looked at any other questions but can't find my own solution! I setting up a CI in gitlab and use the gitlab's shared runner. In build stage I used docker image as base image but when i use <code>docker</code> command it says :</p>
  
  <blockquote>
    <p>Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?</p>
  </blockquote>
  
  <p>I looked at <a href="https://docs.gitlab.com/ee/ci/docker/using_docker_build.html" rel="noreferrer">this</a> topic but still don't understand what should I do?</p>
  
  <blockquote>
    <p>.gitlab-ci.yml :</p>
  </blockquote>
  
  <pre><code>stages:
    - test
    - build
    - deploy
  
  job_1:
    image: python:3.6
    stage: test
    script:
      - sh ./sh_script/install.sh
      - python manage.py test -k
  
  job_2:
    image: docker:stable
    stage: build
    before_script:
      - docker info
    script:
      - docker build -t my-docker-image .
  </code></pre>
  
  <p>I know that the gitlab runner must registered to use <code>docker</code> and share <code>/var/run/docker.sock</code>! But how to do this when using the gitlab own runner?</p>