Class: Holodekk::Image::Instructions::Healthcheck
- Inherits:
-
Builder::Instruction
- Object
- Builder::Instruction
- Holodekk::Image::Instructions::Healthcheck
- Defined in:
- lib/holodekk/image/instructions/healthcheck.rb
Instance Attribute Summary collapse
-
#cmd ⇒ Object
Returns the value of attribute cmd.
-
#interval ⇒ Object
Returns the value of attribute interval.
-
#retries ⇒ Object
Returns the value of attribute retries.
-
#start ⇒ Object
Returns the value of attribute start.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Builder::Instruction
#as_json, instruction_tag, tag, #tag, #to_json
Instance Attribute Details
#cmd ⇒ Object
Returns the value of attribute cmd.
7 8 9 |
# File 'lib/holodekk/image/instructions/healthcheck.rb', line 7 def cmd @cmd end |
#interval ⇒ Object
Returns the value of attribute interval.
7 8 9 |
# File 'lib/holodekk/image/instructions/healthcheck.rb', line 7 def interval @interval end |
#retries ⇒ Object
Returns the value of attribute retries.
7 8 9 |
# File 'lib/holodekk/image/instructions/healthcheck.rb', line 7 def retries @retries end |
#start ⇒ Object
Returns the value of attribute start.
7 8 9 |
# File 'lib/holodekk/image/instructions/healthcheck.rb', line 7 def start @start end |
#timeout ⇒ Object
Returns the value of attribute timeout.
7 8 9 |
# File 'lib/holodekk/image/instructions/healthcheck.rb', line 7 def timeout @timeout end |
Class Method Details
.build(cmd, **kwargs) ⇒ Object
11 12 13 |
# File 'lib/holodekk/image/instructions/healthcheck.rb', line 11 def self.build(cmd, **kwargs) new({ cmd: cmd }.merge(kwargs)) end |
Instance Method Details
#to_dockerfile ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/holodekk/image/instructions/healthcheck.rb', line 15 def to_dockerfile builder = Docker::Dockerfile::InstructionBuilder.new(self) add_option(builder, 'interval') add_option(builder, 'timeout') add_option(builder, 'start') add_option(builder, 'retries') builder.raw_value(cmd) builder.output end |