DockerSdk
the .NET SDK for Docker
Properties | List of all members
DockerSdk.Images.IImageInfo Interface Reference
Inheritance diagram for DockerSdk.Images.IImageInfo:
DockerSdk.Images.IImage

Properties

string Author [get]
 Gets the image's author, or a blank string if no author information is available. More...
 
string Comment [get]
 Gets the comment saved with the image, or a blank string if no comment is available. More...
 
DateTimeOffset CreationTime [get]
 Gets the time at which the image was created. More...
 
string? Digest [get]
 Gets the image's digest. More...
 
IReadOnlyDictionary< string, string > Labels [get]
 Gets the labels that have been applied to the image. More...
 
GuestOsType OsType [get]
 Gets the kind of OS that containers made from this image run. More...
 
IImageParentImage [get]
 Gets the image that this image was built from, of any. More...
 
long Size [get]
 Gets the size, in bytes, of the image's writable layer. More...
 
IReadOnlyList< ImageNameTags [get]
 Gets the names that the image is known by. More...
 
long VirtualSize [get]
 Gets the size, in bytes, of the image's read-only layers. More...
 
string WorkingDirectory [get]
 Gets the image's initial working directory. If the image did not specify a working directory, this will be set to the filesystem's root path. More...
 
- Properties inherited from DockerSdk.Images.IImage
ImageFullId Id [get]
 Gets the image's full ID. More...
 

Additional Inherited Members

- Public Member Functions inherited from DockerSdk.Images.IImage
Task< IImageInfoGetDetailsAsync (CancellationToken ct=default)
 Gets detailed information about the image. More...
 
Task< IContainerRunAsync (CancellationToken ct=default)
 Creates a new container from this image and starts it. More...
 
Task< IContainerRunAsync (CreateContainerOptions options, CancellationToken ct=default)
 Creates a new container from this image and starts it. More...
 

Detailed Description

This class holds a snapshot in time. Its information is immutable once created.

Property Documentation

◆ Author

string DockerSdk.Images.IImageInfo.Author
get

Gets the image's author, or a blank string if no author information is available.

◆ Comment

string DockerSdk.Images.IImageInfo.Comment
get

Gets the comment saved with the image, or a blank string if no comment is available.

◆ CreationTime

DateTimeOffset DockerSdk.Images.IImageInfo.CreationTime
get

Gets the time at which the image was created.

◆ Digest

string? DockerSdk.Images.IImageInfo.Digest
get

Gets the image's digest.

This is a hash of the image's manifest, which is effectively a list of the layers used to produce the image. It represents the image's build inputs–that is, if the build is changed, the digest will change too. Note that this value is not calculated until the image is pushed/pulled.

◆ Labels

IReadOnlyDictionary<string, string> DockerSdk.Images.IImageInfo.Labels
get

Gets the labels that have been applied to the image.

◆ OsType

GuestOsType DockerSdk.Images.IImageInfo.OsType
get

Gets the kind of OS that containers made from this image run.

The only situation where this can be Windows is when running Docker for Windows (which only runs on Windows hosts) in Windows containers mode. In that situation Linux containers will not be visible.

◆ ParentImage

IImage? DockerSdk.Images.IImageInfo.ParentImage
get

Gets the image that this image was built from, of any.

Due to the way that Docker works, this will usually be null:

  • Images using image manifest v2 (the default since Docker 1.3.0) that are pulled from a registry will never have a parent image set.
  • Images built with Buildkit (the default since Docker 20.10) seem to never set the parent.

When the parent image is null, the history will not have any image/layer identifiers either, except the current image's.

◆ Size

long DockerSdk.Images.IImageInfo.Size
get

Gets the size, in bytes, of the image's writable layer.

Mounting the first container for the image will consume memory equal to the virtual size plus the size. Each subsequent container will consume memory equal to the size. These sizes do not include space consumed for log files, volumes, configuration files, swap space, or checkpoints.

◆ Tags

IReadOnlyList<ImageName> DockerSdk.Images.IImageInfo.Tags
get

Gets the names that the image is known by.

◆ VirtualSize

long DockerSdk.Images.IImageInfo.VirtualSize
get

Gets the size, in bytes, of the image's read-only layers.

Mounting the first container for the image will consume memory equal to the virtual size plus the size. Each subsequent container will consume memory equal to the size. These sizes do not include space consumed for log files, volumes, configuration files, swap space, or checkpoints.

◆ WorkingDirectory

string DockerSdk.Images.IImageInfo.WorkingDirectory
get

Gets the image's initial working directory. If the image did not specify a working directory, this will be set to the filesystem's root path.

This directory is guaranteed to exist inside the image.


The documentation for this interface was generated from the following file: