lib/minke/docker/service_discovery.rb in minke-1.0.5 vs lib/minke/docker/service_discovery.rb in minke-1.0.6
- old
+ new
@@ -15,12 +15,14 @@
# - container_name: the name of the running container
# - private_port: the private port which you wish to retrieve an address for
# - task: :run, :cucumber search either the run or cucumber section of the config
def public_address_for container_name, private_port, task
compose = Minke::Docker::DockerCompose.new @config.compose_file_for(task), Minke::Docker::SystemRunner.new
+ docker_runner = Minke::Docker::DockerRunner.new
+
public_address = compose.public_address container_name, private_port
- ip = @docker_runner.get_docker_ip_address
+ ip = docker_runner.get_docker_ip_address
if ip != "127.0.0.1" && ip != "0.0.0.0" && ip != nil
public_address.gsub!('0.0.0.0', ip)
end
public_address