lib/beaker/hypervisor/docker.rb in beaker-2.8.0 vs lib/beaker/hypervisor/docker.rb in beaker-2.9.0
- old
+ new
@@ -14,11 +14,11 @@
# assert that the docker-api gem can talk to your docker
# enpoint. Will raise if there is a version mismatch
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"
+ raise "Docker instance not connectable.\nError was: #{e}\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
@@ -62,10 +62,15 @@
}
@logger.debug("node available as ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@#{ip} -p #{port}")
host['docker_container'] = container
host['docker_image'] = image
+ host['vm_ip'] = container.json["NetworkSettings"]["IPAddress"].to_s
+
end
+
+ hack_etc_hosts @hosts, @options
+
end
def cleanup
@logger.notify "Cleaning up docker"
@hosts.each do |host|