Class: Microsandbox::ImageDetail
- Inherits:
-
Object
- Object
- Microsandbox::ImageDetail
- Defined in:
- lib/microsandbox/image.rb
Overview
Full inspection detail for a cached image, from Microsandbox::Image.inspect.
Instance Attribute Summary collapse
-
#config ⇒ Hash?
readonly
OCI config (digest, env, cmd, entrypoint, working_dir, user, labels, stop_signal).
- #handle ⇒ ImageInfo readonly
-
#layers ⇒ Array<Hash>
readonly
Layer descriptors.
Instance Method Summary collapse
-
#initialize(data) ⇒ ImageDetail
constructor
A new instance of ImageDetail.
- #inspect ⇒ Object
- #reference ⇒ Object
Constructor Details
#initialize(data) ⇒ ImageDetail
Returns a new instance of ImageDetail.
44 45 46 47 48 |
# File 'lib/microsandbox/image.rb', line 44 def initialize(data) @handle = ImageInfo.new(data["handle"]) @config = data["config"] @layers = data["layers"] || [] end |
Instance Attribute Details
#config ⇒ Hash? (readonly)
Returns OCI config (digest, env, cmd, entrypoint, working_dir, user, labels, stop_signal). ‘labels` is a Hash (or nil) of OCI config labels.
40 41 42 |
# File 'lib/microsandbox/image.rb', line 40 def config @config end |
#handle ⇒ ImageInfo (readonly)
37 38 39 |
# File 'lib/microsandbox/image.rb', line 37 def handle @handle end |
#layers ⇒ Array<Hash> (readonly)
Returns layer descriptors.
42 43 44 |
# File 'lib/microsandbox/image.rb', line 42 def layers @layers end |
Instance Method Details
#inspect ⇒ Object
52 53 54 |
# File 'lib/microsandbox/image.rb', line 52 def inspect "#<Microsandbox::ImageDetail reference=#{@handle.reference.inspect} layers=#{@layers.size}>" end |
#reference ⇒ Object
50 |
# File 'lib/microsandbox/image.rb', line 50 def reference = @handle.reference |