title: Making docker container a build executor for jenkins
body: <p>I have a ec2 instance running as my jenkins master. I would like to run a container in that instance that will be used as another build executor so I can tun a few builds simultaneously. </p>
  
  <p>Im having pronblems connecting these.</p>
  
  <p>In the docker hub jenkins docs it says under the relevant section:</p>
  
  <blockquote>
    <p>You can run builds on the master out of the box.</p>
    
    <p>But if you want to attach build slave servers through JNLP (Java Web
    Start): make sure you map the port: -p 50000:50000 - which will be
    used when you connect a slave agent.</p>
    
    <p>If you are only using SSH slaves, then you do NOT need to put that
    port mapping.</p>
  </blockquote>
  
  <p>but when I try to add a node in the jenkins config, it asks remote root directory (probably should be /var/jenkins ? ) and a launch method. </p>
  
  <p>I don't quite understand what I should give it as its launch method to make this work and I don't understand where the port number comes into play.</p>