title: Starting Jenkins in Docker Container
body: <p>I want to run Jenkins in a Docker Container on Centos7.
  I saw the official documentation of Jenkins:
  First, pull the official jenkins image from Docker repository.</p>
  
  <pre><code>docker pull jenkins
  </code></pre>
  
  <p>Next, run a container using this image and map data directory from the container to the host; e.g in the example below /var/jenkins_home from the container is mapped to jenkins/ directory from the current path on the host. Jenkins 8080 port is also exposed to the host as 49001.</p>
  
  <pre><code>docker run -d -p 49001:8080 -v $PWD/jenkins:/var/jenkins_home -t jenkins
  </code></pre>
  
  <p>But when I try to run the docker container I get the following error:</p>
  
  <pre><code>/usr/local/bin/jenkins.sh: line 25: /var/jenkins_home/copy_reference_file.log: Permission denied
  </code></pre>
  
  <p>Can someone tell me how to fix this problem?</p>