import Dockerode, { Container, DockerOptions } from 'dockerode'; export declare abstract class DockerContainer { protected readonly image: string; protected readonly docker: Dockerode; protected container?: Container; protected constructor(image: string, options?: DockerOptions); get id(): string; getIp(name?: string): Promise; listNetworks(): Promise; getNetwork(id: string): Promise; createNetwork(name: string): Promise; connectNetwork(id: string): Promise; removeNetwork(id: string): Promise; /** * Try pull docker image if it doesn't already exist. */ protected tryPullImage(): Promise; /** * Require container, else error exceptionally. * Not a clean design, but it keep the complexity of this implementation low. */ protected requireContainer(): Container; /** * Get host machine port * * @param {string} name of ExposedPorts e.g. '80/tcp' */ getPort(name: string): Promise; /** * tty into docker */ exec(opts: { Cmd: string[]; }): Promise; /** * Inspect docker container info * * @return {Promise>} */ inspect(): Promise>; } export declare function hasImageLocally(image: string, docker: Dockerode): Promise; //# sourceMappingURL=DockerContainer.d.ts.map