Class: DockerEngineRuby::Models::Container::HostConfig::RestartPolicy

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/docker_engine_ruby/models/container.rb

Overview

See Also:

Defined Under Namespace

Modules: Name

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(maximum_retry_count: nil, name: nil) ⇒ Object

Some parameter documentations has been truncated, see DockerEngineRuby::Models::Container::HostConfig::RestartPolicy for more details.

The behavior to apply when the container exits. The default is not to restart.

An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server.

Parameters:



# File 'lib/docker_engine_ruby/models/container.rb', line 1600


Instance Attribute Details

#maximum_retry_countInteger?

If on-failure is used, the number of times to retry before giving up.

Returns:

  • (Integer, nil)


1583
# File 'lib/docker_engine_ruby/models/container.rb', line 1583

optional :maximum_retry_count, Integer, api_name: :MaximumRetryCount

#nameSymbol, ...

  • Empty string means not to restart

  • no Do not automatically restart

  • always Always restart

  • unless-stopped Restart always except when the user has manually stopped the container

  • on-failure Restart only when the container exit code is non-zero



1594
1595
1596
1597
1598
# File 'lib/docker_engine_ruby/models/container.rb', line 1594

optional :name,
enum: -> {
  DockerEngineRuby::Container::HostConfig::RestartPolicy::Name
},
api_name: :Name