Skip to content

Type Alias: ContainerdContainerState ​

ContainerdContainerState = object

The state of a container (ContainerdContainer.state): the one of its task (its main process in containerd) and of its last run. It is read when the container object is obtained and after each of its operations; syncContainerInfo() reads it again.

Properties ​

exitCode ​

exitCode: number

The exit code of its last run, 0 before its first exit.


finishedAt ​

finishedAt: Time | null

When its last run ended, null while it runs after a start and when it never ended.


paused ​

paused: boolean

Whether it is paused (status is 'paused').


pid ​

pid: number

The host process ID of its main process, 0 when it has no task.


restarting ​

restarting: boolean

Whether its restart monitor is restarting it (status is 'restarting').


running ​

running: boolean

Whether its process runs (status is 'running'); false while it is paused.


startedAt ​

startedAt: Time | null

When it was last started, null when it never was.


status ​

status: "created" | "running" | "paused" | "pausing" | "restarting" | "exited" | "unknown"

Its status: 'created' never started; 'running'; 'paused', or 'pausing' while it is being paused; 'restarting' stopped while containerd's restart monitor is to start it again (its restart policy); 'exited' its process ended; 'unknown' a task status containerd reports and the component does not know.

Released under the MIT License.