import type { Readable } from "node:stream"; import type { ContainerCreateOptions, ContainerInspectInfo, HostConfig } from "dockerode"; import { type ContainerRuntimeClient, ImageName } from "../container-runtime"; import type { StartedNetwork } from "../network/network"; import type { StartedTestContainer, TestContainer } from "../test-container"; import type { ArchiveToCopy, BindMount, ContentToCopy, CopyToContainerOptions, DirectoryToCopy, Environment, ExtraHost, FileToCopy, HealthCheck, InspectResult, Labels, ResourcesQuota, TmpFs, Ulimits } from "../types"; import { type PortWithOptionalBinding } from "../utils/port"; import { type ImagePullPolicy } from "../utils/pull-policy"; import type { WaitStrategy } from "../wait-strategies/wait-strategy"; import { GenericContainerBuilder } from "./generic-container-builder"; export declare class GenericContainer implements TestContainer { static fromDockerfile(context: string, dockerfileName?: string): GenericContainerBuilder; protected createOpts: ContainerCreateOptions; protected hostConfig: HostConfig; protected imageName: ImageName; protected startupTimeoutMs?: number; protected waitStrategy: WaitStrategy | undefined; protected environment: Record; protected exposedPorts: PortWithOptionalBinding[]; protected reuse: boolean; protected autoCleanup: boolean; protected autoRemove: boolean; protected networkMode?: string; protected networkAliases: string[]; protected pullPolicy: ImagePullPolicy; protected logConsumer?: (stream: Readable) => unknown; protected filesToCopy: FileToCopy[]; protected directoriesToCopy: DirectoryToCopy[]; protected contentsToCopy: ContentToCopy[]; protected archivesToCopy: ArchiveToCopy[]; protected copyToContainerOptions: CopyToContainerOptions; protected healthCheck?: HealthCheck; constructor(image: string); private isHelperContainer; private isReaper; protected beforeContainerCreated?(): Promise; protected containerCreated?(containerId: string): Promise; protected containerStarting?(inspectResult: InspectResult, reused: boolean): Promise; start(): Promise; protected selectWaitStrategy(client: ContainerRuntimeClient, inspectResult: ContainerInspectInfo): Promise; private reuseOrStartContainer; private reuseContainer; private startContainer; private connectContainerToNetworks; private connectContainerToPortForwarder; private copyToCreatedContainer; private createArchiveToCopyToContainer; private consumeContainerLogs; protected containerStarted?(container: StartedTestContainer, inspectResult: InspectResult, reused: boolean): Promise; withCommand(command: string[]): this; withEntrypoint(entrypoint: string[]): this; withName(name: string): this; withLabels(labels: Labels): this; withEnvironment(environment: Environment): this; withPlatform(platform: string): this; withTmpFs(tmpFs: TmpFs): this; withUlimits(ulimits: Ulimits): this; withSecurityOpt(...securityOptions: string[]): this; withAddedCapabilities(...capabilities: string[]): this; withDroppedCapabilities(...capabilities: string[]): this; withNetwork(network: StartedNetwork): this; withNetworkMode(networkMode: string): this; withNetworkAliases(...networkAliases: string[]): this; withExtraHosts(extraHosts: ExtraHost[]): this; withExposedPorts(...ports: PortWithOptionalBinding[]): this; protected hasExposedPort(port: PortWithOptionalBinding): boolean; withBindMounts(bindMounts: BindMount[]): this; withHealthCheck(healthCheck: HealthCheck): this; withStartupTimeout(startupTimeoutMs: number): this; withWaitStrategy(waitStrategy: WaitStrategy): this; withDefaultLogDriver(): this; withPrivilegedMode(): this; withUser(user: string): this; withReuse(): this; withAutoCleanup(autoCleanup: boolean): this; withAutoRemove(autoRemove: boolean): this; withPullPolicy(pullPolicy: ImagePullPolicy): this; withIpcMode(ipcMode: string): this; withCopyFilesToContainer(filesToCopy: FileToCopy[]): this; withCopyDirectoriesToContainer(directoriesToCopy: DirectoryToCopy[]): this; withCopyContentToContainer(contentsToCopy: ContentToCopy[]): this; withCopyArchivesToContainer(archivesToCopy: ArchiveToCopy[]): this; withCopyToContainerOptions(copyToContainerOptions: CopyToContainerOptions): this; withWorkingDir(workingDir: string): this; withResourcesQuota({ memory, cpu }: ResourcesQuota): this; withSharedMemorySize(bytes: number): this; withLogConsumer(logConsumer: (stream: Readable) => unknown): this; withHostname(hostname: string): this; }