Module: Docker

Defined in:
lib/docker/maker.rb

Defined Under Namespace

Classes: Image, Maker

Class Method Summary collapse

Class Method Details

.images(path = "/usr/bin/docker") ⇒ Object



139
140
141
142
143
144
145
146
# File 'lib/docker/maker.rb', line 139

def self.images path="/usr/bin/docker"
  `#{path} images | tail -n +2`.split(/\n/).inject([]) do |a, line|
    repo, tag, id, created = line.split(/\s\s+/)
    repo = nil if repo == '<none>'
    tag = nil if tag == '<none>'
    a << Image.new(repo, tag, id, created)
  end
end

.make(args) {|d| ... } ⇒ Object

Yields:

  • (d)


130
131
132
133
134
135
# File 'lib/docker/maker.rb', line 130

def self.make(args)
  from = args[:from]
  to = args[:to]
  d = Maker.new(from, to)
  yield d
end