Class: DockerEngineRuby::Models::Container::State

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

Overview

See Also:

Defined Under Namespace

Modules: Status Classes: Health

Instance Attribute Summary collapse

Class Method 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(dead: nil, error: nil, exit_code: nil, finished_at: nil, health: nil, oom_killed: nil, paused: nil, pid: nil, restarting: nil, running: nil, started_at: nil, status: nil) ⇒ Object

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

ContainerState stores container’s running state. It’s part of ContainerJSONBase and will be returned by the “inspect” command.

Parameters:

  • dead (Boolean) (defaults to: nil)
  • error (String) (defaults to: nil)
  • exit_code (Integer) (defaults to: nil)

    The last exit code of this container

  • finished_at (String) (defaults to: nil)

    The time when this container last exited.

  • health (DockerEngineRuby::Models::Container::State::Health) (defaults to: nil)

    Health stores information about the container’s healthcheck results.

  • oom_killed (Boolean) (defaults to: nil)

    Whether a process within this container has been killed because it ran

  • paused (Boolean) (defaults to: nil)

    Whether this container is paused.

  • pid (Integer) (defaults to: nil)

    The process ID of this container

  • restarting (Boolean) (defaults to: nil)

    Whether this container is restarting.

  • running (Boolean) (defaults to: nil)

    Whether this container is running.

  • started_at (String) (defaults to: nil)

    The time when this container was last started.

  • status (Symbol, DockerEngineRuby::Models::Container::State::Status) (defaults to: nil)

    String representation of the container state. Can be one of “created”,



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


Instance Attribute Details

#deadBoolean?

Returns:

  • (Boolean, nil)


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

optional :dead, DockerEngineRuby::Internal::Type::Boolean, api_name: :Dead

#errorString?

Returns:

  • (String, nil)


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

optional :error, String, api_name: :Error

#exit_codeInteger?

The last exit code of this container

Returns:

  • (Integer, nil)


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

optional :exit_code, Integer, api_name: :ExitCode

#finished_atString?

The time when this container last exited.

Returns:

  • (String, nil)


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

optional :finished_at, String, api_name: :FinishedAt

#healthDockerEngineRuby::Models::Container::State::Health?

Health stores information about the container’s healthcheck results.



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

optional :health, -> { DockerEngineRuby::Container::State::Health }, api_name: :Health

#oom_killedBoolean?

Whether a process within this container has been killed because it ran out of memory since the container was last started.

Returns:

  • (Boolean, nil)


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

optional :oom_killed, DockerEngineRuby::Internal::Type::Boolean, api_name: :OOMKilled

#pausedBoolean?

Whether this container is paused.

Returns:

  • (Boolean, nil)


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

optional :paused, DockerEngineRuby::Internal::Type::Boolean, api_name: :Paused

#pidInteger?

The process ID of this container

Returns:

  • (Integer, nil)


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

optional :pid, Integer, api_name: :Pid

#restartingBoolean?

Whether this container is restarting.

Returns:

  • (Boolean, nil)


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

optional :restarting, DockerEngineRuby::Internal::Type::Boolean, api_name: :Restarting

#runningBoolean?

Whether this container is running.

Note that a running container can be paused. The Running and Paused booleans are not mutually exclusive:

When pausing a container (on Linux), the freezer cgroup is used to suspend all processes in the container. Freezing the process requires the process to be running. As a result, paused containers are both Running and Paused.

Use the Status field instead to determine if a container’s state is “running”.

Returns:

  • (Boolean, nil)


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

optional :running, DockerEngineRuby::Internal::Type::Boolean, api_name: :Running

#started_atString?

The time when this container was last started.

Returns:

  • (String, nil)


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

optional :started_at, String, api_name: :StartedAt

#statusSymbol, ...

String representation of the container state. Can be one of “created”, “running”, “paused”, “restarting”, “removing”, “exited”, or “dead”.



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

optional :status, enum: -> { DockerEngineRuby::Container::State::Status }, api_name: :Status

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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