ContainerLease class final
A container a test is using.
Called a lease rather than a container because holding one does not mean
owning one: release removes a dedicated container, and lets go of a
shared one without touching it. A name like RunningContainer invites the
reader to expect a stop that will not happen.
Constructors
- ContainerLease.of(DockerEngine engine, AcquiredContainer acquired)
- A lease over a container that is already running.
Properties
- containerId → String
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- host → String
-
The address to connect to.
no setter
- lifetime → Lifetime
-
no setter
- reused → bool
-
True when this container was already running and got reused.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyInto(
String hostPath, String containerDirectory, {int uid = 0, int gid = 0}) → Future< void> -
Copy a file or directory from the host into
containerDirectory. -
endpoint(
int containerPort) → String -
host:portforcontainerPort. -
exec(
List< String> command, {bool expectSuccess = true}) → Future<ExecResult> -
Run
commandinside the container. -
getFile(
String containerPath) → Future< Uint8List> -
Read the file at
containerPathout of the container. -
logTail(
{int lines = 50}) → Future< String> - The tail of the container's output.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
port(
int containerPort) → int -
The host port Docker chose for
containerPort. -
putFile(
String containerPath, List< int> bytes, {String mode = '644', int uid = 0, int gid = 0}) → Future<void> -
Write
bytesinto the container atcontainerPath, once it is already running. -
release(
) → Future< void> - Let go of the container.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited