-
-
Save retgits/5cc38171444b95c5a69017d1f6e6cc7d to your computer and use it in GitHub Desktop.
jenkins script for DockerCon 2019 demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure there's no volume or container | |
docker stop jenkins && docker rm jenkins | |
docker volume rm jenkins-home | |
# Download the file from Artifactory | |
jfrog rt dl generic-prod/jenkins.zip | |
# Create a volume again | |
docker run --rm --mount source=jenkins-home,destination=/var/jenkins_home -v $(pwd):/backup alpine:3.9 sh -c "cd / && unzip /backup/jenkins.zip && chmod -R 777 /var/jenkins_home" | |
# Let's see if it worked | |
docker run --rm -it --name=jenkins --mount source=jenkins-home,destination=/var/jenkins_home -p 8080:8080 jenkins/jenkins:alpine |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment