diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f6ed6771..0e1cb53dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ BUG FIXES: - providers/docker: Read the created container ID more robustly. - providers/docker: `vagrant share` uses correct IP of proxy VM if it exists. [GH-4342] + - providers/docker: `vagrant\_vagrantfile` expands home directory. [GH-4000] - providers/virtualbox: Show a human-friendly error if VirtualBox didn't clean up an existing VM. [GH-4681] - provisioners/docker: Search for docker binary in multiple places. [GH-4580] diff --git a/plugins/providers/docker/provider.rb b/plugins/providers/docker/provider.rb index 28d5b9967..7bdb200dd 100644 --- a/plugins/providers/docker/provider.rb +++ b/plugins/providers/docker/provider.rb @@ -73,6 +73,10 @@ module VagrantPlugins host_machine_name = :default end + # Expand it so that the home directories and so on get processed + # properly. + vf_path = File.expand_path(vf_path, @machine.env.root_path) + vf_file = File.basename(vf_path) vf_path = File.dirname(vf_path)