lib/minke/docker/docker_runner.rb in minke-1.5.6 vs lib/minke/docker/docker_runner.rb in minke-1.5.7
- old
+ new
@@ -2,9 +2,14 @@
module Docker
class DockerRunner
##
# returns the ip address that docker is running on
def get_docker_ip_address
+ # first try to get the ip from docker-ip env
+ if !ENV['DOCKER_IP'].to_s.empty?
+ return ENV['DOCKER_IP']
+ end
+
if !ENV['DOCKER_HOST'].to_s.empty?
# dockerhost set
host = ENV['DOCKER_HOST'].dup
host.gsub!(/tcp:\/\//, '')
host.gsub!(/:\d+/,'')