diff --git a/plugins/providers/docker/action.rb b/plugins/providers/docker/action.rb index c498c5b14..c0f1e99fb 100644 --- a/plugins/providers/docker/action.rb +++ b/plugins/providers/docker/action.rb @@ -283,6 +283,12 @@ module VagrantPlugins end end + def self.action_suspend + lambda do |env| + raise Errors::SuspendNotSupported + end + end + # The autoload farm action_root = Pathname.new(File.expand_path("../action", __FILE__)) autoload :Build, action_root.join("build") diff --git a/plugins/providers/docker/errors.rb b/plugins/providers/docker/errors.rb index 64a8543ad..677b7be84 100644 --- a/plugins/providers/docker/errors.rb +++ b/plugins/providers/docker/errors.rb @@ -37,6 +37,10 @@ module VagrantPlugins error_key(:state_stopped) end + class SuspendNotSupported < DockerError + error_key(:suspend_not_supported) + end + class SyncedFolderNonDocker < DockerError error_key(:synced_folder_non_docker) end diff --git a/templates/locales/providers_docker.yml b/templates/locales/providers_docker.yml index c2ddb991c..f6d6ae960 100644 --- a/templates/locales/providers_docker.yml +++ b/templates/locales/providers_docker.yml @@ -185,6 +185,11 @@ en: d.remains_running = false end + suspend_not_supported: |- + The "suspend" command is not supported with the Docker provider. + Docker containers don't natively support suspend. If you're using + a host machine, you can suspend the host machine by finding it + in `vagrant global-status` and using `vagrant suspend `. synced_folder_non_docker: |- The "docker" synced folder type can't be used because the provider in use is not Docker. This synced folder type only works with the