providers/docker: nicer error if package is called [GH-4595]

This commit is contained in:
Mitchell Hashimoto 2014-10-21 17:04:40 -07:00
parent 5ebd10c19c
commit 5228437b30
4 changed files with 16 additions and 0 deletions

View File

@ -4,6 +4,7 @@ BUG FIXES:
- core: Fix cases where sometimes SSH connection would hang.
- providers/docker: Create args works. [GH-4526]
- providers/docker: Nicer error if package is called. [GH-4595]
- 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]

View File

@ -45,6 +45,12 @@ module VagrantPlugins
end
end
def self.action_package
lambda do |env|
raise Errors::PackageNotSupported
end
end
# This action just runs the provisioners on the machine.
def self.action_provision
Vagrant::Action::Builder.new.tap do |b|

View File

@ -25,6 +25,10 @@ module VagrantPlugins
error_key(:docker_provider_nfs_without_privileged)
end
class PackageNotSupported < DockerError
error_key(:package_not_supported)
end
class StateNotRunning < DockerError
error_key(:state_not_running)
end

View File

@ -151,6 +151,11 @@ en:
is functional and properly configured.
Host VM ID: %{id}
package_not_supported: |-
The "package" command is not supported with the Docker provider.
If you'd like to commit or push your Docker container, please SSH
into the host VM (if there is one), and run `docker commit` and
so on manually.
state_not_running: |-
The container never entered the "running" state, or entered it
briefly but reverted back to another state. Please verify that