Method: Docker::Compose::NetInfo#initialize

Defined in:
lib/docker/compose/net_info.rb

#initialize(docker_host = ENV['DOCKER_HOST'], my_ips = self.class.ipv4_interfaces) ⇒ NetInfo

Create a new instance of this class.

Parameters:

  • docker_host (String) (defaults to: ENV['DOCKER_HOST'])

    a URI pointing to the docker host

  • list (Array)

    of String dotted-quad IPv4 addresses of local host

[View source]

27
28
29
30
31
32
# File 'lib/docker/compose/net_info.rb', line 27

def initialize(docker_host = ENV['DOCKER_HOST'],
               my_ips = self.class.ipv4_interfaces)
  docker_host ||= 'unix:/var/run/docker.sock'
  @docker_url = URI.parse(docker_host)
  @my_ips = my_ips
end