DockerContainerState class final
What docker inspect says about a container, in the parts a test
needs.
Constructors
-
DockerContainerState({required String id, required bool running, required String status, required int exitCode, required String? health, required Map<
String, int> ports, required Map<String, String> labels, String error = ''}) -
A state; the daemon's answer is parsed by DockerContainerState.fromJson.
const
-
DockerContainerState.fromJson(Map<
String, Object?> json) -
Reads the answer of
GET /containers/{id}/json.factory
Properties
- error → String
-
The error the daemon reports, empty when there is none.
final
- exitCode → int
-
The exit code of the container's process once it exited.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- health → String?
-
The health check's status (
starting,healthy,unhealthy), ornullwhen the image defines no health check.final - id → String
-
The container's id.
final
-
labels
→ Map<
String, String> -
The container's labels.
final
-
ports
→ Map<
String, int> -
The published ports:
5432/tcpto its port on the host.final - running → bool
-
Whether the container's process is running.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → String
-
created,running,paused,restarting,exited,dead...final
Methods
-
mappedPort(
int port) → int? -
The host port the TCP
portof the container is published on, ornullwhen it is not published. -
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