Class: DockerEngine::Models::Container::HostConfig::RestartPolicy

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/docker_engine/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 DockerEngine::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/models/container.rb', line 1640

Instance Attribute Details

#maximum_retry_count ⇒ Integer?

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

Returns:

  • (Integer, nil)


1623
# File 'lib/docker_engine/models/container.rb', line 1623

optional :maximum_retry_count, Integer, api_name: :MaximumRetryCount

#name ⇒ Symbol, ...

  • 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


1634
1635
1636
1637
1638
# File 'lib/docker_engine/models/container.rb', line 1634

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