class Docker::Image

Attributes

id[R]

Public Class Methods

build(path, name) click to toggle source
# File lib/docker/image.rb, line 11
def self.build(path, name)
  name = "#{Docker::USER_NAME}/#{name}" 
  repo, tag = name.split(':')
  id = `docker build -t #{name} #{path}`[-13..-2]
  tag ? Tag.new(repo, tag) : Repository.new(id, repo)
end
new(id) click to toggle source
# File lib/docker/image.rb, line 7
def initialize(id)
  @id = id[0..11]
end

Public Instance Methods

image_id() click to toggle source
# File lib/docker/image.rb, line 26
def image_id
  id
end
inspekt() click to toggle source
# File lib/docker/image.rb, line 22
def inspekt
  Docker.inspekt(id)
end
remove!() click to toggle source
# File lib/docker/image.rb, line 18
def remove!
  `docker rmi #{id}`
end
repositories() click to toggle source
# File lib/docker/image.rb, line 34
def repositories 
  Docker.images.select { |repo| repo == self }
end
to_s() click to toggle source
# File lib/docker/image.rb, line 30
def to_s
  id
end