lib/minke/docker/service_discovery.rb in minke-1.9.6 vs lib/minke/docker/service_discovery.rb in minke-1.9.7
- old
+ new
@@ -18,10 +18,10 @@
# public address for the container e.g. 0.0.0.0:8080
def public_address_for service_name, private_port
begin
ip = @docker_runner.get_docker_ip_address
container_details = find_container_by_name "/#{@project_name}_#{service_name}_1"
- ports = container_details.first.info['Ports'].select { |p| p['PrivatePort'] == private_port }.first
+ ports = container_details.first.info['Ports'].select { |p| p['PrivatePort'] == private_port.to_i }.first
rescue
raise "Unable to find public address for '#{service_name}' on port #{private_port}"
end
return "#{ip}:#{ports['PublicPort']}"