DockerSdk
the .NET SDK for Docker
|
Provides methods for interacting with Docker images. More...
Public Member Functions | |
Task< IImage > | GetAsync (string image, CancellationToken ct=default) |
Loads an object that can be used to interact with the indicated image. More... | |
Task< IImage > | GetAsync (ImageReference image, CancellationToken ct=default) |
Loads an object that can be used to interact with the indicated image. More... | |
Task< IImageInfo > | GetDetailsAsync (string image, CancellationToken ct=default) |
Loads detailed information about an image. More... | |
Task< IImageInfo > | GetDetailsAsync (ImageReference image, CancellationToken ct=default) |
Loads detailed information about an image. More... | |
Task< IReadOnlyList< IImage > > | ListAsync (CancellationToken ct=default) |
Gets a list of Docker images known to the daemon. More... | |
async Task< IReadOnlyList< IImage > > | ListAsync (ListImagesOptions options, CancellationToken ct=default) |
Gets a list of Docker images known to the daemon. More... | |
Task< IImage > | PullAsync (string image, CancellationToken ct=default) |
Retrieves the indicated image from its remote home. More... | |
async Task< IImage > | PullAsync (ImageReference image, CancellationToken ct=default) |
Retrieves the indicated image from its remote home. More... | |
IDisposable | Subscribe (IObserver< ImageEvent > observer) |
Subscribes to events about images. More... | |
Properties | |
Builder | Builder [get] |
Gets a service for building Docker images. More... | |
Provides methods for interacting with Docker images.
|
inline |
Loads an object that can be used to interact with the indicated image.
image | An image name or ID. |
ct | A token used to cancel the operation. |
ImageNotFoundLocallyException | No such image exists. |
System.Net.Http.HttpRequestException | The request failed due to an underlying issue such as loss of network connectivity. |
Task<IImage> DockerSdk.Images.ImageAccess.GetAsync | ( | string | image, |
CancellationToken | ct = default |
||
) |
Loads an object that can be used to interact with the indicated image.
image | An image name or ID. |
ct | A token used to cancel the operation. |
ImageNotFoundLocallyException | No such image exists. |
System.Net.Http.HttpRequestException | The request failed due to an underlying issue such as loss of network connectivity. |
MalformedReferenceException | The image reference is improperly formatted. |
Task<IImageInfo> DockerSdk.Images.ImageAccess.GetDetailsAsync | ( | ImageReference | image, |
CancellationToken | ct = default |
||
) |
Loads detailed information about an image.
image | An image name or ID. |
ct | A token used to cancel the operation. |
ImageNotFoundException | No such image exists. |
System.Net.Http.HttpRequestException | The request failed due to an underlying issue such as network connectivity. |
Task<IImageInfo> DockerSdk.Images.ImageAccess.GetDetailsAsync | ( | string | image, |
CancellationToken | ct = default |
||
) |
Loads detailed information about an image.
image | An image name or ID. |
ct | A token used to cancel the operation. |
ImageNotFoundException | No such image exists. |
System.Net.Http.HttpRequestException | The request failed due to an underlying issue such as network connectivity. |
MalformedReferenceException | The image reference is improperly formatted. |
Task<IReadOnlyList<IImage> > DockerSdk.Images.ImageAccess.ListAsync | ( | CancellationToken | ct = default | ) |
Gets a list of Docker images known to the daemon.
ct | A token used to cancel the operation. |
This method does not necessarily return the same results as the docker image ls
command. To get the same results, use the ListAsync(ListImagesOptions, CancellationToken) overload and give it the ListImagesOptions.CommandLineDefaults options.
The sequence of the results is undefined.
|
inline |
Gets a list of Docker images known to the daemon.
options | Filters for the search. |
ct | A token used to cancel the operation. |
This method does not necessarily return the same results as the docker image ls
command by default. To get the same results, pass in ListImagesOptions.CommandLineDefaults.
The sequence of the results is undefined.
ArgumentNullException | options is null. |
|
inline |
Retrieves the indicated image from its remote home.
image | A reference to the image to fetch. |
ct | A token used to cancel the operation. |
This instructs the Docker daemon to download the image from the image's home registry. The registry is determined based on the image's name, defaulting to "docker.io".
ArgumentException | image is null. |
InvalidOperationException | One Task removed the auth object while another was getting it. |
RegistryAuthException | The registry requires credentials that the client hasn't been given. |
System.Net.Http.HttpRequestException | The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation, or timeout. |
ImageNotFoundRemotelyException | The image does not exist at the Registry indicated by its name. |
Task<IImage> DockerSdk.Images.ImageAccess.PullAsync | ( | string | image, |
CancellationToken | ct = default |
||
) |
Retrieves the indicated image from its remote home.
image | A reference to the image to fetch. |
ct | A token used to cancel the operation. |
This instructs the Docker daemon to download the image from the image's home registry. The registry is determined based on the image's name, defaulting to "docker.io".
ArgumentException | image is null or empty. |
MalformedReferenceException | The input could not be parsed as an image name. |
InvalidOperationException | One Task removed the auth object while another was getting it. |
RegistryAuthException | The registry requires credentials that the client hasn't been given. |
System.Net.Http.HttpRequestException | The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation, or timeout. |
ImageNotFoundRemotelyException | The image does not exist at the Registry indicated by its name. |
IDisposable DockerSdk.Images.ImageAccess.Subscribe | ( | IObserver< ImageEvent > | observer | ) |
Subscribes to events about images.
observer | An object to observe the events. |
|
get |
Gets a service for building Docker images.