title: Execute docker commands in jenkins (in docker container)
body: <p>With docker compose i launch a jenkins container and i want to have the possibility to execute docker command with(docker installed on the server).</p>
  
  <p>But when i tried to make a simple test run hello-world image i have the following error :</p>
  
  <p><code>docker: Cannot connect to the Docker daemon. Is the docker daemon running on this host?.</code></p>
  
  <p>I set the user on the docker group, what's wrong with my docker compose file ?
  in other post i see if i add this line : </p>
  
  <pre><code>/var/run/docker.sock:/var/run/docker.sock
  </code></pre>
  
  <p>my container with jenkins can communicate with docker</p>
  
  <p><strong>my docker compose file</strong></p>
  
  <pre><code>jenkins:
      image: jenkins:2.32.3
      ports:
      - 8088:8080
      - 50000:50000
  
      volumes:
      - /home/my-user-name/docker-jenkins/jenkins_home:/var/jenkins_home
      - /var/run/docker.sock:/var/run/docker.sock
      - /usr/bin/docker:/usr/bin/docker
      - /tmp:/tmp
  </code></pre>