docker Jenkins reusable container
#! /bin/bash | |
# When running for first time, have empty directories; skip the setup by unchecking all plugins, etc. | |
# then shutdown jenkins, add old files and restart. | |
# If it fails, make sure the directory docker-volumes/jenkins and all its children are owned by same user, owner of the docker process. | |
# Or just chown -R on the jenkins directory. | |
docker run -it --name jenkins --network="permanet" --ip="172.30.0.6" \ | |
-v /home/nikhil/.m2:/var/jenkins_home/.m2 \ | |
-v /home/nikhil/.gradle:/var/jenkins_home/.gradle \ | |
-v /home/nikhil/.npm:/var/jenkins_home/.npm \ | |
-v /home/nikhil/docker-volumes/jenkins/jenkins_home:/var/jenkins_home \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
jenkins/jenkins:lts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment