DockerEngine class abstract interface

The slice of the Docker Engine API that rig needs.

An interface rather than a concrete client so that everything above it — sharing, readiness, the CLI — can be tested without Docker. The only test that talks to a real daemon is the integration suite.

Implementers

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

buildImage(ContainerBuild build, String tag) → Future<void>
Builds an image from build and tags it tag.
close() → Future<void>
createContainer(ContainerSpec spec, Map<String, String> labels) → Future<String>
Creates a container for spec carrying labels. Returns its id.
ensureNetwork(String name, Map<String, String> labels) → Future<void>
Creates a network named name carrying labels if none exists yet.
exec(String id, List<String> command) → Future<ExecResult>
Runs command inside the container and waits for it to finish.
getArchive(String id, String path) → Future<Uint8List>
Reads the file or directory at path out of the container, as a ustar archive — what GET /containers/{id}/archive returns.
imageExists(String image) → Future<bool>
inspectContainer(String id) → Future<ContainerInspect>
listContainers({Map<String, List<String>> filters, bool all}) → Future<List<ContainerSummary>>
Containers matching filters, in Docker's filter form: {'label': ['dev.dart-forge.rig=1'], 'status': ['running']}.
listNetworks({Map<String, List<String>> filters}) → Future<List<NetworkSummary>>
Networks matching filters, in the same form listContainers takes.
logs(String id) → Future<String>
The container's entire combined output, from the start.
logTail(String id, {int lines}) → Future<String>
The last lines lines of the container's combined output.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
ping() → Future<void>
Throws DockerUnavailable when the daemon does not answer.
pullImage(String image) → Future<void>
Throws ImagePullFailed on failure.
putArchive(String id, String path, List<int> tarBytes) → Future<void>
Writes tarBytes — a ustar archive — into the container, at path.
removeContainer(String id) → Future<void>
removeImage(String tag) → Future<void>
Remove the image tagged tag.
removeNetwork(String id) → Future<bool>
Removes the network id.
startContainer(String id) → Future<void>
stopContainer(String id, {Duration timeout}) → Future<void>
toString() → String
A string representation of this object.
inherited
version() → Future<EngineVersion>

Operators

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