Class: DockerEngineAPI::Models::Container::State

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/docker_engine_api/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 DockerEngineAPI::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 (DockerEngineAPI::Models::Container::State::Health, nil) (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, DockerEngineAPI::Models::Container::State::Status) (defaults to: nil)

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



# File 'lib/docker_engine_api/models/container.rb', line 2301

Instance Attribute Details

#deadBoolean?

Returns:

  • (Boolean, nil)


2223
# File 'lib/docker_engine_api/models/container.rb', line 2223

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

#errorString?

Returns:

  • (String, nil)


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

optional :error, String, api_name: :Error

#exit_codeInteger?

The last exit code of this container

Returns:

  • (Integer, nil)


2234
# File 'lib/docker_engine_api/models/container.rb', line 2234

optional :exit_code, Integer, api_name: :ExitCode

#finished_atString?

The time when this container last exited.

Returns:

  • (String, nil)


2240
# File 'lib/docker_engine_api/models/container.rb', line 2240

optional :finished_at, String, api_name: :FinishedAt

#healthDockerEngineAPI::Models::Container::State::Health?

Health stores information about the container’s healthcheck results.



2246
# File 'lib/docker_engine_api/models/container.rb', line 2246

optional :health, -> { DockerEngineAPI::Container::State::Health }, api_name: :Health, nil?: true

#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)


2253
# File 'lib/docker_engine_api/models/container.rb', line 2253

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

#pausedBoolean?

Whether this container is paused.

Returns:

  • (Boolean, nil)


2259
# File 'lib/docker_engine_api/models/container.rb', line 2259

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

#pidInteger?

The process ID of this container

Returns:

  • (Integer, nil)


2265
# File 'lib/docker_engine_api/models/container.rb', line 2265

optional :pid, Integer, api_name: :Pid

#restartingBoolean?

Whether this container is restarting.

Returns:

  • (Boolean, nil)


2271
# File 'lib/docker_engine_api/models/container.rb', line 2271

optional :restarting, DockerEngineAPI::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)


2286
# File 'lib/docker_engine_api/models/container.rb', line 2286

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

#started_atString?

The time when this container was last started.

Returns:

  • (String, nil)


2292
# File 'lib/docker_engine_api/models/container.rb', line 2292

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”.



2299
# File 'lib/docker_engine_api/models/container.rb', line 2299

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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/docker_engine_api/models/container.rb', line 2437