<p>I'm using the <a href="https://wiki.jenkins-ci.org/display/JENKINS/Kubernetes+Plugin" rel="nofollow">Kubernetes Jenkins</a> plugin to orchestrate jenkins slaves </p>

<p>I want to run all the jobs in Docker (build docker images and execute tests/builds in docker).</p>

<p>example jenkins job:  </p>

<pre><code>docker run -e NEXUS_USERNAME=${NEXUS_USERNAME} -e NEXUS_PASSWORD=${NEXUS_PASSWORD} common-dropwizard:latest mvn deploy
</code></pre>

<p>I am using the jenkinsci/jnlp-slave from here:  <a href="https://hub.docker.com/r/jenkinsci/jnlp-slave/" rel="nofollow">https://hub.docker.com/r/jenkinsci/jnlp-slave/</a></p>

<p>Unfortunately, the slave image doesn't appear to support running docker.  My question is what is the best approach to accomplish this?</p>

<p>thanks</p>

<p>You need to install docker client and mount the docker socket so you can access the Docker host. Then you can interact with that Docker host</p>

<p><a href="https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/" rel="nofollow">https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/</a>
<a href="https://github.com/jenkinsci/docker-workflow-plugin/tree/master/demo" rel="nofollow">https://github.com/jenkinsci/docker-workflow-plugin/tree/master/demo</a></p>
