title: sharing docker.sock or docker in docker (dind)
body: <p>We're running a mesos cluster and jenkins for continuous integration workflow.
  Jenkins is configured with the mesos plugin.</p>
  
  <p>Previously we built our docker images in mesos containers. Now we are switching to docker containers for building our docker images.</p>
  
  <p>I've been searching for the advantage of building our docker images inside a docker container with dind image like this one "dind-jenkins-slave" found on docker hub. </p>
  
  <p>With dind you lose the caching opportunities when sharing the docker.sock of the host. And with dind you also have to push the privileged parameter. </p>
  
  <p>What is the downside of just sharing the docker.sock of the host?</p>