UNPKG

@cto.ai/ops

Version:

💻 CTO.ai - The CLI built for Teams 🚀

23 lines (22 loc) • 945 B
import Docker from '@cto.ai/dockerode'; import { OpCommand } from './../types'; export declare class ContainerService { log: { (...data: any[]): void; (message?: any, ...optionalParams: any[]): void; }; container: any; getPorts: (portMap: string[]) => [string[], string[]]; hasDuplicates: (allPorts: string[]) => boolean; checkLocalPorts: (localPorts: string[]) => Promise<string[]>; validatePorts: (portMap: string[]) => Promise<void>; create: (op: OpCommand, options: Docker.ContainerCreateOptions) => Promise<Docker.Container>; /** * Starts and runs the current container. * NOTE: will `process.exit` when the container wraps up! */ start: (stream: NodeJS.ReadWriteStream) => Promise<void>; handleStream: (stream: NodeJS.ReadWriteStream) => void; handleExit: (stream: NodeJS.ReadWriteStream, isRaw: boolean, exitStatus: number) => void; resize: () => void; }