Last active
November 22, 2016 10:28
-
-
Save ishitcno1/d9eaa4a06ff932e86f331a281f42f511 to your computer and use it in GitHub Desktop.
Setup a Linux server. Install docker and jenkins.
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
#!/bin/bash | |
# Set LC_CTYPE | |
echo 'LC_CTYPE="en_US.UTF-8"' >> /etc/default/locale | |
source /etc/default/locale | |
# Install docker | |
apt-get update | |
apt-get install apt-transport-https ca-certificates | |
apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | tee /etc/apt/sources.list.d/docker.list | |
apt-get update | |
apt-get install -y docker-engine | |
service docker start | |
groupadd docker | |
# Install jenkins | |
wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add - | |
sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' | |
apt-get update | |
apt-get install -y jenkins | |
usermod -aG docker jenkins |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment