Skip to content

Instantly share code, notes, and snippets.

@stantonk
Created January 22, 2016 06:17
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 stantonk/1a21ed129c0cd65ed622 to your computer and use it in GitHub Desktop.
Save stantonk/1a21ed129c0cd65ed622 to your computer and use it in GitHub Desktop.
Provision Jenkins + Docker in Vagrant w/ Oracle JVM Java 8.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "forwarded_port", guest: 8080, host: 8080
config.vm.provision "shell", inline: <<-SHELL
sudo apt-get update --fix-missing
wget --no-check-certificate https://github.com/aglover/ubuntu-equip/raw/master/equip_java8.sh && bash equip_java8.sh
wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get -y install jenkins
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" > /etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt-get purge lxc-docker
sudo apt-cache policy docker-engine
sudo apt-get -y install linux-image-extra-$(uname -r)
sudo apt-get -y install docker-engine
echo "make sure docker works by running \"sudo docker run hello-world\"..."
SHELL
#sudo service docker start <---- dont need this?
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment