providers/docker: always copy the host VM Vagrantfile
This commit is contained in:
parent
22d9b0eeb2
commit
568185c3e9
|
@ -7,7 +7,4 @@ Vagrant.configure("2") do |config|
|
||||||
v.check_guest_additions = false
|
v.check_guest_additions = false
|
||||||
v.functional_vboxsf = false
|
v.functional_vboxsf = false
|
||||||
end
|
end
|
||||||
|
|
||||||
# Don't sync this directory
|
|
||||||
config.vm.synced_folder ".", "/vagrant", disabled: true
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -60,11 +60,9 @@ module VagrantPlugins
|
||||||
default_path = File.expand_path("../hostmachine/Vagrantfile", __FILE__)
|
default_path = File.expand_path("../hostmachine/Vagrantfile", __FILE__)
|
||||||
vf_path = @machine.env.data_dir.join("docker-host", "Vagrantfile")
|
vf_path = @machine.env.data_dir.join("docker-host", "Vagrantfile")
|
||||||
begin
|
begin
|
||||||
if !vf_path.file?
|
@machine.env.lock("docker-provider-hostvm") do
|
||||||
@machine.env.lock("docker-provider-hostvm") do
|
vf_path.dirname.mkpath
|
||||||
vf_path.dirname.mkpath
|
FileUtils.cp(default_path, vf_path)
|
||||||
FileUtils.cp(default_path, vf_path)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
rescue Vagrant::Errors::EnvironmentLockedError
|
rescue Vagrant::Errors::EnvironmentLockedError
|
||||||
# Lock contention, just retry
|
# Lock contention, just retry
|
||||||
|
|
Loading…
Reference in New Issue