I want to run Jenkins in a Docker container on Centos7. I saw the official Jenkins documentation: First pull the official Jenkins image from the Docker repository.
docker pull jenkins
Then start the container using this image and map the data directory to the container with the host; for example, in the example below, / var / jenkins _home from the container is mapped to the jenkins / directory from the current path on the host. The Jenkins 8080 port is also available for the host as 49001.
docker run -d -p 49001:8080 -v $PWD/jenkins:/var/jenkins_home -t jenkins
But when I try to start the docker container, I get the following error:
/usr/local/bin/jenkins.sh: line 25: /var/jenkins_home/copy_reference_file.log: Permission denied
Can someone tell me how to fix this problem?
user5558501
source share