...
Code Block | ||
---|---|---|
| ||
sudo docker ps |
if the Jenkins container is restarting again and again then check the logs using below command
Code Block language bash sudo docker logs --tail 50 –follow --timestamps Jenkins
If the logs are showing like below Wrong volume permissions?
Code Block language bash touch: cannot touch '/var/jenkins_home/copy_reference_file.log': Permission denied Can not write to /var/jenkins_home/copy_reference_file.log.
The volume directory /data/jenkins need to be separated with the admin ownership to keep the Jenkins home
Code Block language bash sudo chown 1000 /data/Jenkins
Then run the command: (Now the container is up and running.)
sudo docker ps -a
Executing into Jenkins container: sudo docker exec -it jenkins /bin/bash