title: Execute docker host command inside jenkins docker container
body: <p>I have a docker container running jenkins. I want inside this container to start other container, so outside this container. </p>
  
  <p>I've tried to start my jenkins controller with :</p>
  
  <pre><code>docker run -v /var/run/docker.sock:/var/run/docker.sock  -v $(which docker):/bin/docker
  </code></pre>
  
  <p>( As written here : <a href="https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/" rel="noreferrer">https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/</a> )</p>
  
  <p>But when inside of my container I try to run a Docker command, I have the typical message </p>
  
  <pre><code> FATA[0000] Get http://%2Fvar%2Frun%2Fdocker.sock/v1.18/containers/json: dial unix /var/run/docker.sock: 
  connect: permission denied. Are you trying to connect to a TLS-enabled daemon without TLS? 
  </code></pre>
  
  <p>And no way to run docker command inside this container.. </p>
  
  <p>I've tried with and without --privileged=true, it still don't work.</p>
  
  <p>If you have any ideas ! </p>