From d7343c5b567dc0ce41282941ca3e2f43ccdcef05 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 28 Apr 2014 11:08:58 -0700 Subject: [PATCH] providers/docker: expand path to share relative to docker env --- .../providers/docker/action/host_machine_sync_folders.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/providers/docker/action/host_machine_sync_folders.rb b/plugins/providers/docker/action/host_machine_sync_folders.rb index fb6332709..15bb0c22b 100644 --- a/plugins/providers/docker/action/host_machine_sync_folders.rb +++ b/plugins/providers/docker/action/host_machine_sync_folders.rb @@ -88,6 +88,12 @@ module VagrantPlugins data.delete(:type) end + # Expand the hostpath relative to _our_ root path. Otherwise, + # it expands it relative to the proxy VM, which is not what + # we want. + data[:hostpath] = File.expand_path( + data[:hostpath], env[:machine].env.root_path) + # Generate an ID that is deterministic based on our machine # and Vagrantfile path... id = Digest::MD5.hexdigest(