lakutata
Version:
An IoC-based universal application framework.
192 lines (180 loc) • 5.1 kB
TypeScript
import { DTO } from './TypeDef.internal.96.js';
import { ContainerRestartPolicy, ContainerPort, ContainerBind, ContainerDevice, ContainerNetwork, ContainerCapability } from './TypeDef.internal.109.js';
import { Writable } from 'node:stream';
declare class ContainerSettingOptions extends DTO {
/**
* Container name
*/
name?: string;
/**
* Container hostname
*/
hostname?: string;
/**
* Gives the container full access to the host.
*/
privileged?: boolean;
/**
* Attach standard streams to a TTY
*/
tty?: boolean;
/**
* Container environment variables
*/
env?: Record<string, string>;
/**
* Memory limit in bytes.
* @default 0 (No limit)
*/
memoryLimit?: number;
/**
* CPUs in which to allow execution (e.g., [0,1]).
*/
cpuSet?: number[];
/**
* Container restart policy
*/
restartPolicy?: ContainerRestartPolicy;
/**
* Container expose ports
*/
ports?: Omit<ContainerPort, 'host'>[];
/**
* Container binds
*/
binds?: ContainerBind[];
/**
* A list of devices to add to the container.
*/
devices?: (Pick<ContainerDevice, 'hostPath' | 'containerPath'> & Partial<Pick<ContainerDevice, 'cgroupPermissions'>>)[];
/**
* Container networks
*/
networks?: Partial<Pick<ContainerNetwork, 'networkName' | 'ip' | 'ipv6'>>[];
/**
* Disable OOM Killer for the container.
*/
OOMKillDisable?: boolean;
/**
* Kernel capabilities
*/
capabilities?: ContainerCapability[];
/**
* Cgroup to use for the container.
*/
cgroup?: string;
/**
* Path to cgroups under which the container's cgroup is created.
* If the path is not absolute, the path is considered to be relative to the cgroups path of the init process.
* Cgroups are created if they do not already exist.
*/
cgroupParent?: string;
/**
* Set the PID (Process) Namespace mode for the container. It can be either:
* "container:<name|id>": joins another container's PID namespace
* "host": use the host's PID namespace inside the container
*/
pidMode?: string;
/**
* Command to run specified as a string or an array of strings.
*/
cmd?: string[];
/**
* The entry point for the container as a string or an array of strings.
* If the array consists of exactly one empty string ([""]) then the entry point is reset to system default
* (i.e., the entry point used by docker when there is no ENTRYPOINT instruction in the Dockerfile).
*/
entrypoint?: string[];
}
declare class ContainerStopOptions extends DTO {
/**
* Stop signal
*/
signal?: string;
/**
* Number of seconds to wait before killing the container
*/
timeout?: number;
}
declare class ContainerRemoveOptions extends DTO {
/**
* If the container is running, kill it before removing it.
* @default false
*/
force?: boolean;
}
declare class ContainerKillOptions extends DTO {
/**
* Signal to send to the container as an integer or string (e.g. SIGINT).
* @default "SIGKILL"
*/
signal?: string;
}
declare class ContainerCommitOptions extends DTO {
/**
* Commit repoTag
*/
repoTag?: string;
/**
* Whether to pause the container before committing
* @default true
*/
pauseBeforeCommitting?: boolean;
}
declare class ContainerTTYConsoleSizeOptions extends DTO {
cols: number;
rows: number;
}
declare class ContainerCreateTTYOptions extends DTO {
/**
* Command to run, as a string or array of strings.
*/
cmd?: string | string[];
/**
* Initial console size
*/
consoleSize?: ContainerTTYConsoleSizeOptions;
}
declare class ContainerLogsOptions extends DTO {
/**
* Keep connection after returning logs.
* @default true
*/
follow?: boolean;
/**
* Only return logs since this time, as a UNIX timestamp
* @default 0
*/
since?: number;
/**
* Only return logs before this time, as a UNIX timestamp
* @default 0
*/
until?: number;
/**
* Add timestamps to every log line
* @default false
*/
timestamps?: boolean;
/**
* Only return this number of log lines from the end of the logs.
*/
tail?: number;
}
declare class ContainerExecOptions extends DTO {
/**
* Command to run, as a string or array of strings.
*/
cmd: string | string[];
}
declare class ContainerExportDirectoryOptions extends DTO {
/**
* Resource in the container’s filesystem to archive.
*/
path: string;
/**
* Destination of exported archive
*/
destination: string | Writable;
}
export { ContainerCommitOptions, ContainerCreateTTYOptions, ContainerExecOptions, ContainerExportDirectoryOptions, ContainerKillOptions, ContainerLogsOptions, ContainerRemoveOptions, ContainerSettingOptions, ContainerStopOptions, ContainerTTYConsoleSizeOptions };