Skip to content

Instantly share code, notes, and snippets.

@neilberget
Last active December 21, 2015 23:29
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 neilberget/6382518 to your computer and use it in GitHub Desktop.
Save neilberget/6382518 to your computer and use it in GitHub Desktop.
Set up a vagrant box on OS X with docker ready to go. Based off of great blog post at: http://dyli.sh/2013/08/23/OSX-Vagrant-Docker-Sinatra.html
#!/usr/bin/env bash
apt-get update
apt-get install linux-image-extra-`uname -r` dkms -y;
sudo sh -c "curl http://get.docker.io/gpg | apt-key add -";
sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list";
apt-get update
apt-get install -q -y --force-yes lxc-docker;
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "raring"
config.vm.box_url = "http://cloud-images.ubuntu.com/raring/current/raring-server-cloudimg-vagrant-amd64-disk1.box"
config.vm.network :forwarded_port, guest: 5000, host: 5000
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "512"]
end
config.vm.provision :shell, :path => "bootstrap.sh"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment