class DevDock::DevImage
Public Class Methods
new(image_name)
click to toggle source
# File lib/dev_dock/image.rb, line 7 def initialize(image_name) @name = image_name @container_config = nil end
Public Instance Methods
container_config()
click to toggle source
# File lib/dev_dock/image.rb, line 25 def container_config if @container_config.nil? image = Docker::Image.get(@name) @container_config = image.json['ContainerConfig'] end @container_config end
exist?()
click to toggle source
# File lib/dev_dock/image.rb, line 16 def exist? Docker::Image::exist?(@name) end
name()
click to toggle source
# File lib/dev_dock/image.rb, line 12 def name @name end
pull()
click to toggle source
# File lib/dev_dock/image.rb, line 20 def pull # for some reason pulling images isn't part of the api? `docker pull #{@name}` end
user()
click to toggle source
# File lib/dev_dock/image.rb, line 33 def user return container_config['User'] end