From 238338d803de29b60d14e22a7c35cf8d549b2e43 Mon Sep 17 00:00:00 2001 From: Martin Jonas Date: Wed, 10 Oct 2018 17:24:55 +0200 Subject: [PATCH] Deterministic host VM synced folder location for Docker provider to prevent broken sync after host VM shutdown Fix for #10282 --- plugins/providers/docker/action/host_machine_sync_folders.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/providers/docker/action/host_machine_sync_folders.rb b/plugins/providers/docker/action/host_machine_sync_folders.rb index 045b3bd04..a521293d1 100644 --- a/plugins/providers/docker/action/host_machine_sync_folders.rb +++ b/plugins/providers/docker/action/host_machine_sync_folders.rb @@ -109,8 +109,7 @@ module VagrantPlugins # If we specify exact then we know what we're doing if !data[:docker__exact] - data[:guestpath] = - "/var/lib/docker/docker_#{Time.now.to_i}_#{rand(100000)}" + data[:guestpath] = "/var/lib/docker/docker_#{id}" end # Add this synced folder onto the new config if we haven't