Skip to content

Instantly share code, notes, and snippets.

@ishitcno1
Last active November 22, 2016 10:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ishitcno1/d9eaa4a06ff932e86f331a281f42f511 to your computer and use it in GitHub Desktop.
Save ishitcno1/d9eaa4a06ff932e86f331a281f42f511 to your computer and use it in GitHub Desktop.
Setup a Linux server. Install docker and jenkins.
#!/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