Skip to content

Instantly share code, notes, and snippets.

@stantonk
Last active July 26, 2017 19:57
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/d83cad78fc60f44abb65ca25be90286a to your computer and use it in GitHub Desktop.
Save stantonk/d83cad78fc60f44abb65ca25be90286a to your computer and use it in GitHub Desktop.
python and dockerd in an Ubuntu VM.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.provision :shell, :inline => <<-EOS
sudo apt-get update && sudo apt-get install -y python-dev python-pip git
sudo apt-get install python-pip
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
sudo apt-get install linux-headers-3.13.0-125-generic
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get update
sudo apt-get install docker-ce
sudo docker run hello-world
sudo usermod -aG docker vagrant
sudo apt-get install default-jdk
EOS
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "2048"]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment