Docker class
Top level class generally used as the starting point manage docker containers and images.
Constructors
- Docker()
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
-
containers(
{bool excludeStopped = false}) → List< Container> -
Returns a list of containers
If
excludeStopped
is true (defaults to false) then only running containers will be returned. -
create(
Image image, String containerName, {List< String> ? args, String? argString}) → Container -
creates a container from the passed
image
with the givencontainerName
. Theargs
andargString
are appended to the command and allow you to add abitrary arguments. Theargs
list is added before theargString
. -
findContainerById(
String containerId) → Container? -
Searches for a container with the given
containerId
. Returns null if a container could not be found. -
findContainerByName(
String containerName) → Container? -
Searches for a container with the given
containerName
. If more than container has the same name the first container will be returned. Use containers to get a complete list of containers. Returns null if a container could not be found. -
findImageById(
String imageId) → Image? -
Returns an Image for the give
imageId
. If theimageId
is not found then null is returned. -
findImageByName(
String imageName) → Image? -
Searches for and returns the image that matches
imageName
. If more than one image matches then anAmbiguousImageNameException
is thrown. If no matching image is found a null is returned. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pull(
String fullname) → Image - Pulls an image from a remote repository. The fullName is of the form repo/name:tag The repo and tag are optional.
-
run(
Image image, {List< String> ? args, String? argString, List<String> environmentVars = const <String>[], bool daemon = true}) → void -
Creates and starts a docker container.
If
daemon
is true (the default) then the container is started as a daemon. Whendaemon
is false then we pass the interactive and attach arguments to the docker start command to allow full interaction. from you existing enviornment by passing a list of environment variable names inenvironmentVars
. -
toString(
) → String -
A string representation of this object.
inherited
-
volumes(
) → List< Volume> - Returns the list of volumes
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited