2013-05-03 18:03:01 -04:00
|
|
|
GOPHERS_KEY = "308C15A29AD198E9"
|
2013-04-15 21:01:54 -04:00
|
|
|
|
|
|
|
Vagrant::Config.run do |config|
|
2013-04-18 00:10:53 -04:00
|
|
|
config.vm.box = 'precise64'
|
|
|
|
config.vm.box_url = 'http://files.vagrantup.com/precise64.box'
|
2013-04-15 21:01:54 -04:00
|
|
|
config.vm.share_folder 'v-data', '/data/docker', "#{File.dirname(__FILE__)}/../.."
|
|
|
|
|
2013-05-03 18:03:01 -04:00
|
|
|
# Add docker PPA key to the local repository and install docker
|
|
|
|
pkg_cmd = "apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys #{GOPHERS_KEY}; " \
|
|
|
|
"echo 'deb http://ppa.launchpad.net/gophers/go/ubuntu precise main' >/etc/apt/sources.list.d/gophers-go.list; " \
|
2013-04-15 21:01:54 -04:00
|
|
|
# Install ubuntu packaging dependencies and create ubuntu packages
|
2013-05-03 18:03:01 -04:00
|
|
|
pkg_cmd << "export DEBIAN_FRONTEND=noninteractive; apt-get -qq update; apt-get install -qq -y git debhelper autotools-dev devscripts golang-stable; " \
|
|
|
|
"export GPG_KEY='#{ENV['GPG_KEY']}'; cd /data/docker/packaging/ubuntu; make ubuntu"
|
|
|
|
config.vm.provision :shell, :inline => pkg_cmd
|
2013-04-15 21:01:54 -04:00
|
|
|
end
|