Class: Dapp::Dimg::DockerRegistry::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/dapp/dimg/docker_registry/base.rb

Direct Known Subclasses

Dimg

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dapp, repository) ⇒ Base

Returns a new instance of Base.



8
9
10
11
# File 'lib/dapp/dimg/docker_registry/base.rb', line 8

def initialize(dapp, repository)
  self.dapp = dapp
  self.repository = repository
end

Instance Attribute Details

#dappObject

Returns the value of attribute dapp.



5
6
7
# File 'lib/dapp/dimg/docker_registry/base.rb', line 5

def dapp
  @dapp
end

#repositoryObject

Returns the value of attribute repository.



6
7
8
# File 'lib/dapp/dimg/docker_registry/base.rb', line 6

def repository
  @repository
end

Instance Method Details

#gcr_image_delete(tag) ⇒ Object



25
26
27
# File 'lib/dapp/dimg/docker_registry/base.rb', line 25

def gcr_image_delete(tag)
  image_delete_by_tag(tag)
end

#image_config(tag) ⇒ Object



21
22
23
# File 'lib/dapp/dimg/docker_registry/base.rb', line 21

def image_config(tag)
  ruby2go_docker_registry_command(command: :image_config, options: { reference: tag_reference(tag) })
end

#image_delete(tag) ⇒ Object



29
30
31
32
# File 'lib/dapp/dimg/docker_registry/base.rb', line 29

def image_delete(tag)
  digest = image_digest(tag)
  image_delete_by_digest(digest)
end

#image_delete_by_digest(digest) ⇒ Object



38
39
40
# File 'lib/dapp/dimg/docker_registry/base.rb', line 38

def image_delete_by_digest(digest)
  ruby2go_docker_registry_command(command: :image_delete, options: { reference: digest_reference(digest) })
end

#image_delete_by_tag(tag) ⇒ Object



34
35
36
# File 'lib/dapp/dimg/docker_registry/base.rb', line 34

def image_delete_by_tag(tag)
  ruby2go_docker_registry_command(command: :image_delete, options: { reference: tag_reference(tag) })
end

#image_digest(tag) ⇒ Object



42
43
44
# File 'lib/dapp/dimg/docker_registry/base.rb', line 42

def image_digest(tag)
  ruby2go_docker_registry_command(command: :image_digest, options: { reference: tag_reference(tag) })
end

#image_id(tag) ⇒ Object



13
14
15
# File 'lib/dapp/dimg/docker_registry/base.rb', line 13

def image_id(tag)
  ruby2go_docker_registry_command(command: :image_id, options: { reference: tag_reference(tag) })
end

#image_parent_id(tag) ⇒ Object



17
18
19
# File 'lib/dapp/dimg/docker_registry/base.rb', line 17

def image_parent_id(tag)
  ruby2go_docker_registry_command(command: :image_parent_id, options: { reference: tag_reference(tag) })
end