ContainerState class

The full lifecycle state of a container.

Returned as the State field in a Docker inspect response.

Constructors

ContainerState({String? status, bool? running, bool? paused, bool? restarting, bool? oomKilled, bool? dead, int? pid, int? exitCode, String? error, String? startedAt, String? finishedAt, ContainerHealth? health})
Creates a ContainerState with the given fields.
const
ContainerState.fromJson(Map<String, dynamic> json)
Deserialises a ContainerState from Docker's JSON representation.
factory

Properties

dead bool?
true when the container is in the dead state.
final
error String?
Error string describing why the container stopped, if applicable.
final
exitCode int?
Exit code of the container's main process (meaningful when running is false).
final
finishedAt String?
RFC 3339 timestamp when the container last stopped.
final
hashCode int
The hash code for this object.
no setterinherited
health ContainerHealth?
Health-check state, or null if no health check is configured.
final
oomKilled bool?
true when the container was killed due to an out-of-memory condition.
final
paused bool?
true when the container is paused.
final
pid int?
The PID of the container's init process on the host.
final
restarting bool?
true when the container is in the process of restarting.
final
running bool?
true when the container is currently running.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startedAt String?
RFC 3339 timestamp when the container last started.
final
status String?
Lifecycle status string: 'created', 'running', 'paused', 'restarting', 'removing', 'exited', or 'dead'.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited