Created
September 27, 2017 13:57
-
-
Save scottharwell/69409477c2bf5b582d7840a8fda61e26 to your computer and use it in GitHub Desktop.
Docker start script for Jenkins.
This file contains hidden or 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
#!/usr/bin/sh | |
docker pull jenkins/jenkins && \ | |
docker run -d --name myjenkins \ | |
-p 8083:8083 \ | |
-p 50000:50000 \ | |
-v /etc/timezone:/etc/timezone \ | |
-v /var/jenkins_home/:/var/jenkins_home/ \ | |
-v /var/lib/jenkins/cert:/var/lib/jenkins/cert \ | |
-v /var/lib/jenkins/pk:/var/lib/jenkins/pk \ | |
--env JENKINS_OPTS="--httpPort=-1 --httpsPort=8083 --httpsCertificate=/var/lib/jenkins/cert --httpsPrivateKey=/var/lib/jenkins/pk" \ | |
--env JAVA_OPTS="-Djava.awt.headless=true -Dmail.smtp.starttls.enable=true" \ | |
jenkins/jenkins \ | |
&& \ | |
docker exec -itd --user root myjenkins bash -c "apt-get update && \ | |
apt-get upgrade -y && \ | |
apt-get install -y openjdk-8-jdk wget unzip && \ | |
wget https://services.gradle.org/distributions/gradle-4.2-bin.zip && \ | |
mkdir /opt/gradle && \ | |
unzip gradle-4.2-bin.zip -d /opt/gradle && \ | |
ln -s /opt/gradle/gradle-4.2/bin/gradle /usr/bin/gradle && \ | |
curl -sL https://deb.nodesource.com/setup_6.x | bash - && \ | |
apt-get install -y nodejs && \ | |
npm install -g typescript" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment