本家のファイルを最低限動く程度まで削りました。
synced_folderにnfsを使用しているので、WindowsはVagrant WinNFSdをインストールしてください。
Vagrantfile
# -*- mode: ruby -*-
# # vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.ssh.insert_key = false
config.vm.box = "coreos-alpha"
config.vm.box_url = "https://storage.googleapis.com/alpha.release.core-os.net/amd64-usr/current/coreos_production_vagrant.json"
config.vm.provider :virtualbox do |v|
v.check_guest_additions = false
v.functional_vboxsf = false
v.memory = 1024
v.cpus = 1
end
if Vagrant.has_plugin?("vagrant-vbguest") then
config.vbguest.auto_update = false
end
config.vm.network :private_network, :ip => "172.17.8.101"
config.vm.synced_folder "host-side path", "guest-side path", :nfs => true, :mount_options => ["nolock,vers=3,udp"]
end
プロビジョニング時にDocker Composeをインストールするならこんな感じでしょうか。
Vagrantfile
# -*- mode: ruby -*-
# # vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.ssh.insert_key = false
config.vm.box = "coreos-alpha"
config.vm.box_url = "https://storage.googleapis.com/alpha.release.core-os.net/amd64-usr/current/coreos_production_vagrant.json"
config.vm.provider :virtualbox do |v|
v.check_guest_additions = false
v.functional_vboxsf = false
v.memory = 1024
v.cpus = 1
end
if Vagrant.has_plugin?("vagrant-vbguest") then
config.vbguest.auto_update = false
end
config.vm.network :private_network, :ip => "172.17.8.101"
config.vm.provision :shell, inline: <<-SHELL
mkdir -p /opt/bin
curl -L https://github.com/docker/compose/releases/download/1.12.0/docker-compose-`uname -s`-`uname -m` > /opt/bin/docker-compose
chmod +x /opt/bin/docker-compose
SHELL
config.vm.synced_folder "host-side path", "guest-side path", :nfs => true, :mount_options => ["nolock,vers=3,udp"]
end