Skip to content

Instantly share code, notes, and snippets.

@robinwl
Last active August 29, 2015 14:13
Show Gist options
  • Save robinwl/db05dae6b791bba4a724 to your computer and use it in GitHub Desktop.
Save robinwl/db05dae6b791bba4a724 to your computer and use it in GitHub Desktop.
Vagrant-docker skel
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "robin/trusty64"
config.vm.hostname = "docker"
config.vm.provision "shell", inline: $shell
if Vagrant.has_plugin?("vagrant-vbguest") then
config.vbguest.auto_update = false
end
end
$shell = <<-CONTENTS
export DEBIAN_FRONTEND=noninteractive
export http_proxy=http://apt.naas.io:3142
apt-get update && apt-get install -y \
curl
curl -sSL https://get.docker.com/ubuntu/ | sudo sh
chmod -x /etc/update-motd.d/*
echo "cd /vagrant" | tee -a \
/root/.bashrc \
/home/vagrant/.bashrc
echo 'alias docker-rm="docker rm $(docker ps -a -q)"' | tee -a \
/root/.bashrc \
/home/vagrant/.bashrc
CONTENTS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment