lib/beaker/hypervisor/docker.rb in beaker-2.3.0 vs lib/beaker/hypervisor/docker.rb in beaker-2.4.0

- old
+ new

@@ -9,10 +9,15 @@ # increase the http timeouts as provisioning images can be slow ::Docker.options = { :write_timeout => 300, :read_timeout => 300 }.merge(::Docker.options || {}) # assert that the docker-api gem can talk to your docker # enpoint. Will raise if there is a version mismatch - ::Docker.validate_version! + begin + ::Docker.validate_version! + rescue Excon::Errors::SocketError => e + raise "Docker instance not found.\nif you are on OSX, you might not have Boot2Docker setup correctly\nCheck your DOCKER_HOST variable has been set" + end + # Pass on all the logging from docker-api to the beaker logger instance ::Docker.logger = @logger end def provision