You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: files/tools/vagrant/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/providers/docker/provider.rb
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
require"digest/md5"
2
2
require"fileutils"
3
3
require"thread"
4
+
require"uri"
4
5
5
6
require"log4r"
6
7
@@ -132,6 +133,17 @@ def host_vm?
132
133
end
133
134
end
134
135
136
+
# This checks whether the host system is configured to talk to a remote
137
+
# docker host by inspecting the `DOCKER_HOST` env var.
138
+
defremote_docker_host?
139
+
!ENV['DOCKER_HOST'].to_s.strip.empty?
140
+
end
141
+
142
+
# Returns the host part from the `DOCKER_HOST` env var
143
+
defremote_docker_host
144
+
URI.parse(ENV['DOCKER_HOST']).host
145
+
end
146
+
135
147
# Returns the forwarded SSH port on the host. If no port forwarding
0 commit comments