Skip to content

Commit

Permalink
Create install_Docker_Jenkins.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
deraviyam authored Jul 5, 2017
1 parent 9332cfe commit 57b1442
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions install_Docker_Jenkins.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# install docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
apt-cache policy docker-ce
sudo apt-get install -y docker-ce
sudo usermod -aG docker ubuntu

# run jenkins
mkdir -p /var/jenkins_home
chown -R 1000:1000 /var/jenkins_home/
docker run -p 8080:8080 -p 50000:50000 -v /var/jenkins_home:/var/jenkins_home -d --name jenkins jenkins

# show endpoint
echo 'Jenkins installed'
echo 'You should now be able to access jenkins at: http://'$(curl -s ifconfig.co)':8080'

0 comments on commit 57b1442

Please sign in to comment.