Class: Docker::Repository

Inherits:
Image
  • Object
show all
Defined in:
lib/docker/repository.rb

Direct Known Subclasses

Tag

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Image

build, #inspekt, #repositories

Methods included from Helpers

#rails_image, #rails_server

Methods included from Equality

#==

Constructor Details

#initialize(id, name) ⇒ Repository

Returns a new instance of Repository.



5
6
7
8
# File 'lib/docker/repository.rb', line 5

def initialize(id, name)
  @id       = name 
  @image_id = id 
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/docker/repository.rb', line 4

def id
  @id
end

#image_idObject (readonly)

Returns the value of attribute image_id.



4
5
6
# File 'lib/docker/repository.rb', line 4

def image_id
  @image_id
end

Instance Method Details

#remove!Object



10
11
12
# File 'lib/docker/repository.rb', line 10

def remove!
  `docker rmi #{id}`
end

#remove_image!Object



14
15
16
# File 'lib/docker/repository.rb', line 14

def remove_image!
  `docker rmi -f #{image_id}`
end

#to_sObject



18
19
20
# File 'lib/docker/repository.rb', line 18

def to_s
  id 
end