|
Task< IContainer > | CreateAndStartAsync (string image, CancellationToken ct=default) |
| Creates a Docker container and starts it. More...
|
|
Task< IContainer > | CreateAndStartAsync (ImageReference image, CancellationToken ct=default) |
| Creates a Docker container and starts it. More...
|
|
Task< IContainer > | CreateAndStartAsync (string image, CreateContainerOptions options, CancellationToken ct=default) |
| Creates a Docker container and starts it. More...
|
|
async Task< IContainer > | CreateAndStartAsync (ImageReference image, CreateContainerOptions options, CancellationToken ct=default) |
| Creates a Docker container and starts it. More...
|
|
Task< IContainer > | CreateAsync (string image, CancellationToken ct=default) |
| Creates a Docker container from an image. More...
|
|
Task< IContainer > | CreateAsync (ImageReference image, CancellationToken ct=default) |
| Creates a Docker container from an image. More...
|
|
Task< IContainer > | CreateAsync (string image, CreateContainerOptions options, CancellationToken ct=default) |
| Creates a Docker container from an image. More...
|
|
async Task< IContainer > | CreateAsync (ImageReference image, CreateContainerOptions options, CancellationToken ct=default) |
| Creates a Docker container from an image. More...
|
|
Task< IContainer > | GetAsync (string container, CancellationToken ct=default) |
| Loads an object that can be used to interact with the indicated container. More...
|
|
async Task< IContainer > | GetAsync (ContainerReference container, CancellationToken ct=default) |
| Loads an object that can be used to interact with the indicated container. More...
|
|
Task< IContainerInfo > | GetDetailsAsync (string container, CancellationToken ct=default) |
| Gets detailed information about a container. More...
|
|
async Task< IContainerInfo > | GetDetailsAsync (ContainerReference container, CancellationToken ct=default) |
| Gets detailed information about a container. More...
|
|
Task< IReadOnlyList< IContainer > > | ListAsync (CancellationToken ct=default) |
| Gets a list of Docker containers known to the daemon. More...
|
|
async Task< IReadOnlyList< IContainer > > | ListAsync (ListContainersOptions options, CancellationToken ct=default) |
| Gets a list of Docker containers known to the daemon. More...
|
|
Task | StartAsync (string container, CancellationToken ct=default) |
| Starts a Docker container, if it is not already running. More...
|
|
async Task | StartAsync (ContainerReference container, CancellationToken ct=default) |
| Starts a Docker container, if it is not already running. More...
|
|
IDisposable | Subscribe (IObserver< ContainerEvent > observer) |
| Subscribes to events about containers. More...
|
|
Provides access to functionality involving Docker containers.
Not all container functionality is available directly on this class. See Container for more functionality.
Task<IContainer> DockerSdk.Containers.ContainerAccess.CreateAndStartAsync |
( |
ImageReference |
image, |
|
|
CancellationToken |
ct = default |
|
) |
| |
Creates a Docker container and starts it.
- Parameters
-
image | The image to create the container from. |
ct | A token used to cancel the operation. |
- Returns
- A Task<TResult> that resolves when the container's main process has started.
From the perspective of Docker, there's no concept of whether the container's main process has "finished
starting"–just that the process has been started at all. Thus, for example, if the process is a web server, this method's Task
may resolve before the web server is ready for connections. If the application using this library needs to synchronize with events happening inside the container, it should monitor the container's logs or use other real-time mechanisms to do so.
It's also possible that a short-lived process might exit before the method's Task
resolves.
- Exceptions
-
ArgumentException | image is null. |
ImageNotFoundLocallyException | The Docker daemon cannot find the image locally, and the CreateContainerOptions.PullCondition option is not set to pull it automatically. |
System.Net.Http.HttpRequestException | The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation, or timeout. |
async Task<IContainer> DockerSdk.Containers.ContainerAccess.CreateAndStartAsync |
( |
ImageReference |
image, |
|
|
CreateContainerOptions |
options, |
|
|
CancellationToken |
ct = default |
|
) |
| |
|
inline |
Creates a Docker container and starts it.
- Parameters
-
image | The image to create the container from. |
options | Options for how to create the image and how it should behave. |
ct | A token used to cancel the operation. |
- Returns
- A Task<TResult> that resolves when the container's main process has started.
From the perspective of Docker, there's no concept of whether the container's main process has "finished
starting"–just that the process has been started at all. Thus, for example, if the process is a web server, this method's Task
may resolve before the web server is ready for connections. If the application using this library needs to synchronize with events happening inside the container, it should monitor the container's logs or use other real-time mechanisms to do so.
It's also possible that a short-lived process might exit before the method's Task
resolves.
- Exceptions
-
ArgumentException | image and/or options are null. |
ImageNotFoundLocallyException | The Docker daemon cannot find the image locally, and the CreateContainerOptions.PullCondition option is not set to pull it automatically. |
ImageNotFoundRemotelyException | The Docker image does not exist, even remotely. (Only applies when pulling an image, which is not enabled by default.) |
NetworkNotFoundException | One of the networks specified does not exist. |
MalformedReferenceException | The options specified a name for the image, but the name does not meet the expectations of a well-formed container name. |
RegistryAuthException | The registry requires credentials that the client hasn't been given. (Only applies when pulling an image, which is not enabled by default.) |
System.Net.Http.HttpRequestException | The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation, or timeout. |
Task<IContainer> DockerSdk.Containers.ContainerAccess.CreateAndStartAsync |
( |
string |
image, |
|
|
CancellationToken |
ct = default |
|
) |
| |
Creates a Docker container and starts it.
- Parameters
-
image | The image to create the container from. |
ct | A token used to cancel the operation. |
- Returns
- A Task<TResult> that resolves when the container's main process has started.
From the perspective of Docker, there's no concept of whether the container's main process has "finished
starting"–just that the process has been started at all. Thus, for example, if the process is a web server, this method's Task
may resolve before the web server is ready for connections. If the application using this library needs to synchronize with events happening inside the container, it should monitor the container's logs or use other real-time mechanisms to do so.
It's also possible that a short-lived process might exit before the method's Task
resolves.
- Exceptions
-
ArgumentException | image is null or empty. |
ImageNotFoundLocallyException | The Docker daemon cannot find the image locally, and the CreateContainerOptions.PullCondition option is not set to pull it automatically. |
System.Net.Http.HttpRequestException | The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation, or timeout. |
MalformedReferenceException | The image input is not well-formed. |
Creates a Docker container and starts it.
- Parameters
-
image | The image to create the container from. |
options | Options for how to create the image and how it should behave. |
ct | A token used to cancel the operation. |
- Returns
- A Task<TResult> that resolves when the container's main process has started.
From the perspective of Docker, there's no concept of whether the container's main process has "finished
starting"–just that the process has been started at all. Thus, for example, if the process is a web server, this method's Task
may resolve before the web server is ready for connections. If the application using this library needs to synchronize with events happening inside the container, it should monitor the container's logs or use other real-time mechanisms to do so.
It's also possible that a short-lived process might exit before the method's Task
resolves.
- Exceptions
-
ArgumentException | image and/or options are null. |
ImageNotFoundLocallyException | The Docker daemon cannot find the image locally, and the CreateContainerOptions.PullCondition option is not set to pull it automatically. |
ImageNotFoundRemotelyException | The Docker image does not exist, even remotely. (Only applies when pulling an image, which is not enabled by default.) |
NetworkNotFoundException | One of the networks specified does not exist. |
MalformedReferenceException | The image input is not well-formed. –or– The options specified a name for the image, but the name does not meet the expectations of a well-formed container name. |
RegistryAuthException | The registry requires credentials that the client hasn't been given. (Only applies when pulling an image, which is not enabled by default.) |
System.Net.Http.HttpRequestException | The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation, or timeout. |
async Task DockerSdk.Containers.ContainerAccess.StartAsync |
( |
ContainerReference |
container, |
|
|
CancellationToken |
ct = default |
|
) |
| |
|
inline |
Starts a Docker container, if it is not already running.
- Parameters
-
container | The container to start. |
ct | A token used to cancel the operation. |
- Returns
- A Task<TResult> that resolves when the container's main process has started.
From the perspective of Docker, there's no concept of whether the container's main process has "finished
starting"–just that the process has been started at all. Thus, for example, if the process is a web server, this method's Task
may resolve before the web server is ready for connections. If the application using this library needs to synchronize with events happening inside the container, it should monitor the container's logs or use other real-time mechanisms to do so.
It's also possible that a short-lived process might exit before the method's Task
resolves.
- Exceptions
-
ArgumentException | container is null. |
ContainerNotFoundException | The indicated container does not exist. |
NetworkNotFoundException | One of the networks specified during container creation does not exist. |
System.Net.Http.HttpRequestException | The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation, or timeout. |
Task DockerSdk.Containers.ContainerAccess.StartAsync |
( |
string |
container, |
|
|
CancellationToken |
ct = default |
|
) |
| |
Starts a Docker container, if it is not already running.
- Parameters
-
container | The container to start. |
ct | A token used to cancel the operation. |
- Returns
- A Task<TResult> that resolves when the container's main process has started.
From the perspective of Docker, there's no concept of whether the container's main process has "finished
starting"–just that the process has been started at all. Thus, for example, if the process is a web server, this method's Task
may resolve before the web server is ready for connections. If the application using this library needs to synchronize with events happening inside the container, it should monitor the container's logs or use other real-time mechanisms to do so.
It's also possible that a short-lived process might exit before the method's Task
resolves.
- Exceptions
-
ContainerNotFoundException | The indicated container does not exist. |
NetworkNotFoundException | One of the networks specified during container creation does not exist. |
System.Net.Http.HttpRequestException | The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation, or timeout. |
MalformedReferenceException | The container input is not a well-formed container reference. |
ArgumentException | container is null or empty. |