ContainerInfo Class
A snapshot of a container's state, obtained from an inspect operation.
public sealed class ContainerInfo : IEquatable<ContainerInfo>- Implements
Constructors
| Name | Description |
|---|---|
| ContainerInfo() |
ContainerInfo()
ContainerInfo.cs- Obsolete: Constructors of types with required members are not supported in this version of your compiler.
[Obsolete("Constructors of types with required members are not supported in this version of your compiler.", true)]
public ContainerInfo()No documentation is available.
Properties
| Name | Description |
|---|---|
| ExitCode | Gets the exit code of the container, when it has exited. |
| FinishedAt | Gets the time the container last exited, when available. |
| Health | Gets the status of the health check of the container (the HEALTHCHECK instruction of its image), or ContainerHealthStatus.None when it has none or the runtime does not report it. |
| IPAddress | Gets the container IP address on its primary network, when available. |
| Id | Gets the container id. |
| Image | Gets the image the container was created from. |
| Labels | Gets the container labels. |
| Name | Gets the container name. |
| Ports | Gets the published ports, mapping each container port to its host port. |
| StartedAt | Gets the time the container was last started, when available. |
| State | Gets the container state. |
| Status | Gets the raw status string reported by the runtime. |
ExitCode
ContainerInfo.csFinishedAt
ContainerInfo.csGets the time the container last exited, when available.
public DateTimeOffset? FinishedAt { get; init; }Property value
Health
ContainerInfo.csGets the status of the health check of the container (the HEALTHCHECK instruction of its image), or ContainerHealthStatus.None when it has none or the runtime does not report it.
public ContainerHealthStatus Health { get; init; }Property value
IPAddress
ContainerInfo.csImage
ContainerInfo.csLabels
ContainerInfo.csGets the container labels.
public IReadOnlyDictionary<string, string> Labels { get; init; }Property value
Name
ContainerInfo.csPorts
ContainerInfo.csGets the published ports, mapping each container port to its host port.
public IReadOnlyDictionary<int, int> Ports { get; init; }Property value
StartedAt
ContainerInfo.csGets the time the container was last started, when available.
public DateTimeOffset? StartedAt { get; init; }Property value
State
ContainerInfo.csStatus
ContainerInfo.csMethods
| Name | Description |
|---|---|
| Equals(ContainerInfo?) | |
| Equals(object?) | |
| GetHashCode() | |
| ToString() |
Equals overloads
Equals(ContainerInfo?)
public bool Equals(ContainerInfo? other)No documentation is available.
Equals(object?)
GetHashCode()
ToString()
Operators
| Name | Description |
|---|---|
| operator ==(ContainerInfo?, ContainerInfo?) | |
| operator !=(ContainerInfo?, ContainerInfo?) |
operator ==(ContainerInfo?, ContainerInfo?)
public static bool operator ==(ContainerInfo? left, ContainerInfo? right)No documentation is available.
operator !=(ContainerInfo?, ContainerInfo?)
public static bool operator !=(ContainerInfo? left, ContainerInfo? right)No documentation is available.