Last active
November 22, 2015 12:58
-
-
Save masiuchi/56455846194e3f755593 to your computer and use it in GitHub Desktop.
Vagrantfile for building Docker environment on Ubuntu 14.04 LTS.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
$script = <<SCRIPT | |
apt-get update | |
# Docker | |
# http://www.atmarkit.co.jp/ait/articles/1406/10/news031.html | |
apt-get -y install docker.io | |
update-rc.d docker defaults | |
gpasswd -a vagrant docker | |
service docker restart | |
# Docker Compose | |
apt-get -y install python-pip | |
pip install docker-compose | |
# http://blog.namiking.net/post/2015/09/install-docker-compose/ | |
echo 'COMPOSE_API_VERSION=auto' >> /etc/environment | |
SCRIPT | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.provision "shell", inline: $script | |
config.vm.provider "virtualbox" do |vb| | |
vb.customize ["modifyvm", :id, "--paravirtprovider", "kvm"] | |
# 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