Skip to content

Instantly share code, notes, and snippets.

@michaelbunch
Last active December 11, 2015 16:33
Show Gist options
  • Save michaelbunch/e1f3c850808a843b6c63 to your computer and use it in GitHub Desktop.
Save michaelbunch/e1f3c850808a843b6c63 to your computer and use it in GitHub Desktop.
Install latest Docker and tools on Ubuntu Trusty
#!/bin/bash
# This is primarily for Vagrant provisioning. Production instances shouldn't include Docker-compose
# in favor of other scheduling tools.
# Run this as root or using sudo
apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D &&
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" > /etc/apt/sources.list.d/docker.list &&
apt-get update &&
apt-get install -y linux-image-generic-lts-trusty docker-engine &&
apt-get autoremove -y &&
curl -L https://github.com/docker/compose/releases/download/1.5.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose &&
chmod +x /usr/local/bin/docker-compose
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.hostname = "pwap"
config.vm.network "private_network", ip: "192.168.10.10"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
vb.customize ["modifyvm", :id, "--cpus", "1"]
end
config.vm.synced_folder ".", "/vagrant/", mount_options: ["dmode=777", "fmode=777"]
# Install Docker from Gist
config.vm.provision "shell", inline: "sudo curl http://bit.ly/1Q7v4Ks -L | sh"
config.vm.provision "shell", run: "always", inline: "cd /vagrant && docker-compose up -d"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment