class Docker::Inspect
Attributes
inspekt[R]
Public Class Methods
new(id)
click to toggle source
# File lib/docker/inspect.rb, line 7 def initialize(id) @id = id[0..11] @inspekt = JSON.load(`docker inspect #{@id}`).first end
Public Instance Methods
env()
click to toggle source
# File lib/docker/inspect.rb, line 16 def env inspekt["Config"]["Env"].each_with_object({}) do |e,h| pair = e.split('=') h[pair.first] = pair.last end end
ip_address()
click to toggle source
# File lib/docker/inspect.rb, line 23 def ip_address inspekt["NetworkSettings"]["IPAddress"] end
name()
click to toggle source
# File lib/docker/inspect.rb, line 12 def name inspekt["Name"][1..-1] end
ports()
click to toggle source
# File lib/docker/inspect.rb, line 27 def ports inspekt["NetworkSettings"]["Ports"] end
state()
click to toggle source
# File lib/docker/inspect.rb, line 31 def state inspekt["State"] end
to_s()
click to toggle source
# File lib/docker/inspect.rb, line 35 def to_s inspekt.to_s end