providers/docker: always copy the host VM Vagrantfile

This commit is contained in:
Mitchell Hashimoto 2014-04-20 08:45:51 -07:00
parent 22d9b0eeb2
commit 568185c3e9
2 changed files with 3 additions and 8 deletions

View File

@ -7,7 +7,4 @@ Vagrant.configure("2") do |config|
v.check_guest_additions = false
v.functional_vboxsf = false
end
# Don't sync this directory
config.vm.synced_folder ".", "/vagrant", disabled: true
end

View File

@ -60,11 +60,9 @@ module VagrantPlugins
default_path = File.expand_path("../hostmachine/Vagrantfile", __FILE__)
vf_path = @machine.env.data_dir.join("docker-host", "Vagrantfile")
begin
if !vf_path.file?
@machine.env.lock("docker-provider-hostvm") do
vf_path.dirname.mkpath
FileUtils.cp(default_path, vf_path)
end
@machine.env.lock("docker-provider-hostvm") do
vf_path.dirname.mkpath
FileUtils.cp(default_path, vf_path)
end
rescue Vagrant::Errors::EnvironmentLockedError
# Lock contention, just retry