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, 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.
43 44 45 46 47 |
# File 'lib/microsandbox/image.rb', line 43 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, stop_signal).
39 40 41 |
# File 'lib/microsandbox/image.rb', line 39 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.
41 42 43 |
# File 'lib/microsandbox/image.rb', line 41 def layers @layers end |
Instance Method Details
#inspect ⇒ Object
51 52 53 |
# File 'lib/microsandbox/image.rb', line 51 def inspect "#<Microsandbox::ImageDetail reference=#{@handle.reference.inspect} layers=#{@layers.size}>" end |
#reference ⇒ Object
49 |
# File 'lib/microsandbox/image.rb', line 49 def reference = @handle.reference |