Class: Daytona::CreateSandboxFromImageParams
- Inherits:
-
CreateSandboxBaseParams
- Object
- CreateSandboxBaseParams
- Daytona::CreateSandboxFromImageParams
- Defined in:
- lib/daytona/common/daytona.rb
Instance Attribute Summary collapse
-
#image ⇒ String, Image
Custom Docker image to use for the Sandbox.
-
#resources ⇒ Daytona::Resources?
Resource configuration for the Sandbox.
Attributes inherited from CreateSandboxBaseParams
#auto_archive_interval, #auto_delete_interval, #auto_stop_interval, #env_vars, #ephemeral, #labels, #language, #network_allow_list, #network_block_all, #os_user, #public, #timeout, #volumes
Instance Method Summary collapse
-
#initialize(image:, resources: nil, **args) ⇒ CreateSandboxFromImageParams
constructor
Initialize CreateSandboxFromImageParams.
-
#to_h ⇒ Hash<Symbol, Object>
Convert to hash representation.
Constructor Details
#initialize(image:, resources: nil, **args) ⇒ CreateSandboxFromImageParams
Initialize CreateSandboxFromImageParams
155 156 157 158 159 160 |
# File 'lib/daytona/common/daytona.rb', line 155 def initialize(image:, resources: nil, **args) @image = image @resources = resources super(**args) end |
Instance Attribute Details
#image ⇒ String, Image
Returns Custom Docker image to use for the Sandbox. If an Image object is provided, the image will be dynamically built.
132 133 134 |
# File 'lib/daytona/common/daytona.rb', line 132 def image @image end |
#resources ⇒ Daytona::Resources?
Returns Resource configuration for the Sandbox. If not provided, sandbox will have default resources.
136 137 138 |
# File 'lib/daytona/common/daytona.rb', line 136 def resources @resources end |
Instance Method Details
#to_h ⇒ Hash<Symbol, Object>
Convert to hash representation
165 166 167 168 169 170 |
# File 'lib/daytona/common/daytona.rb', line 165 def to_h super.merge( image:, resources: resources&.to_h ).compact end |