UNPKG

@augment-vir/node

Version:

A collection of augments, helpers types, functions, and classes only for Node.js (backend) JavaScript environments.

58 lines (57 loc) 1.9 kB
import { type JsonCompatibleArray, type JsonCompatibleObject } from '@augment-vir/common'; import { type DockerContainerStatus } from './container-status.js'; /** * Properties on {@link DockerContainerInfo}.State, retrieved from `docker.container.getInfo()`. * * @category Node : Docker : Util * @category Package : @augment-vir/node * @package [`@augment-vir/node`](https://www.npmjs.com/package/@augment-vir/node) */ export type DockerContainerInfoState = { Status: DockerContainerStatus; Running: boolean; Paused: boolean; Restarting: boolean; OOMKilled: boolean; Dead: boolean; Pid: number; ExitCode: number; Error: string; StartedAt: string; FinishedAt: string; }; /** This type signature is incomplete. Add to it as necessary. */ /** * Properties on the output from `docker.container.getInfo()`. Not all these properties are filled * in all the way, particularly most of properties with nested objects. * * @category Node : Docker : Util * @category Package : @augment-vir/node * @package [`@augment-vir/node`](https://www.npmjs.com/package/@augment-vir/node) */ export type DockerContainerInfo = Readonly<{ Id: string; Created: string; Path: string; Args: ReadonlyArray<string>; State: DockerContainerInfoState; Image: string; ResolvConfPath: string; HostnamePath: string; HostsPath: string; LogPath: string; Name: string; RestartCount: number; Driver: string; Platform: string; MountLabel: string; ProcessLabel: string; AppArmorProfile: string; ExecIDs: unknown; HostConfig: JsonCompatibleObject; GraphDriver: JsonCompatibleObject; Mounts: JsonCompatibleArray; Config: JsonCompatibleObject; NetworkSettings: JsonCompatibleObject; }>; export declare function getContainerInfo(containerNameOrId: string): Promise<DockerContainerInfo | undefined>;