Image class

Represents a docker image.

Constructors

Image({required String repositoryAndName, required String tag, required String? imageid, required String? created, required String? size})
Creates an image with the given properties. Note: this doesn't create a docker image just an in memory representation of one. Use Docker().create to create an image.
Image.fromName(String imageName)
Creates an image with the given imageName. Note: this doesn't create a docker image just an in memory representation of one.

Properties

created String?
The date time this image was created.
final
fullname String
Returns the full name of the image
no setter
hashCode int
The hash code for this object.
no setteroverride
imageid String?
The id of this image. We use the short 12 char verison.
final
name String
simple name of this image.
no setter
registry String?
regsitry where this image is located.
no setter
repository String?
repository name of this image.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size String?
The size on disk of this image in bytes.
final
tag String?
The tag of this image. If one wasn't supplied then 'latest' is returned.
no setter

Methods

containers() List<Container>
create(String containerName, {List<String>? args, String? argString}) Container
creates a container with the name containerName using this image. Returns the newly created Container. Throws a ContainerExistsException if a container with the passed containerName already exists. The args and argString are appended to the command and allow you to add abitrary arguments. The args list is added before the argString.
delete({bool force = false}) → void
Delete the docker image.
isSame({required String name, String? registry, String? repository, String? tag}) bool
Returns true if the pass name components match this image. This method allows you to do a partial match by passing only the components you want to match on. The name must be passed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pull() → void
Pulls a docker image from a remote repository using the images fullname
toString() String
A string representation of this object.
inherited

Operators

operator ==(covariant Image other) bool
The equality operator.
override