title: Running Jenkins in a Docker Container
body: <p>Im trying to get some hands on experience in Jenkins and wanted to run it in a docker container. I was following the tutorial <a href="https://engineering.riotgames.com/news/putting-jenkins-docker-container" rel="nofollow noreferrer">here</a>. I have docker installed on my machine and using Kitematic I launched the official Jenkins docker image (tag: latest) using:</p>
  
  <pre><code>docker run -p 8080:8080 jenkins
  </code></pre>
  
  <p>However once the container is setup when I go to <code>192.168.99.100:8080</code> (<code>192.168.99.100</code> is my docker-machine ip) it shows the default <code>nginx</code> page. <code>192.168.99.100:8080/jenkins</code> shows </p>
  
  <pre><code>HTTP ERROR 404
  
  Problem accessing /jenkins. Reason:
  
      Not Found
  </code></pre>
  
  <p>The weird part is that kitmatic shows a web preview of the running container and shows jenkins up and running fine, but how do I access it via the browser????<a href="https://i.stack.imgur.com/QkoVp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QkoVp.png" alt="enter image description here"></a></p>
  
  <p><strong>EDIT :</strong> Just tried docker run -p 8082:8080 jenkins. and it works i.e. I can see the jenkins landing page. Whaaaa.. ?</p>