Skip to content

Instantly share code, notes, and snippets.

@jpfuentes2
Last active December 28, 2015 18:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpfuentes2/7547214 to your computer and use it in GitHub Desktop.
Save jpfuentes2/7547214 to your computer and use it in GitHub Desktop.
Latest stable docker + Ubuntu Precise (12.04) 64bit
#!/usr/bin/env ruby
# -*- mode: ruby -*-
# vi: set ft=ruby :
def machine_exists?
!Dir.glob("#{File.dirname(__FILE__)}/.vagrant/machines/default/*/id").empty?
end
Vagrant::Config.run do |config|
config.vm.box = "precise-64-docker"
config.vm.box_url = "http://bit.ly/dockerprecise64"
config.ssh.forward_agent = true
unless machine_exists?
cmd = "apt-get update -qq;
service docker stop;
apt-get install -q -y --force-yes lxc-docker"
config.vm.provision :shell, :inline => cmd
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment