/** * Docker Tool — Dedicated Docker management commands. * * Provides structured Docker operations: * - Container lifecycle (run, stop, start, restart, rm) * - Container interaction (exec, logs, inspect, stats) * - Image management (build, pull, push, tag, rmi) * - Docker Compose (up, down, ps, logs) * - Volume & network management * - Disk usage and cleanup * - Health monitoring * * Hermes equivalent: docker-management SKILL.md + hermes-s6-container-supervision */ export interface DockerCommandOptions { /** Timeout in ms (default: 30000) */ timeoutMs?: number; /** Working directory */ cwd?: string; /** Additional environment variables */ env?: Record; /** Capture stdout (default: true) */ captureStdout?: boolean; /** Capture stderr (default: true) */ captureStderr?: boolean; } export interface DockerCommandResult { /** Exit code */ exitCode: number; /** stdout output */ stdout: string; /** stderr output */ stderr: string; /** Duration in ms */ durationMs: number; /** Whether command succeeded */ success: boolean; } export interface DockerContainerInfo { id: string; name: string; image: string; status: string; state: string; ports: string; created: string; size?: string; } export interface DockerImageInfo { repository: string; tag: string; id: string; size: string; created: string; } export interface DockerVolumeInfo { name: string; driver: string; mountpoint: string; labels: Record; scope: string; } export interface DockerNetworkInfo { id: string; name: string; driver: string; scope: string; containers: Record; } export interface DockerDiskUsage { images: { count: number; reclaimable: string; totalSize: string; }; containers: { count: number; reclaimable: string; totalSize: string; }; volumes: { count: number; reclaimable: string; totalSize: string; }; buildCache: { count: number; reclaimable: string; totalSize: string; }; } export declare class DockerTool { /** * Check if Docker is available. */ isAvailable(): Promise<{ available: boolean; version?: string; error?: string; }>; /** * Run a container. */ runContainer(image: string, options?: { name?: string; detach?: boolean; ports?: string[]; volumes?: string[]; env?: Record; network?: string; command?: string[]; remove?: boolean; }): Promise; /** * Stop a container. */ stopContainer(nameOrId: string, timeout?: number): Promise; /** * Start a stopped container. */ startContainer(nameOrId: string): Promise; /** * Restart a container. */ restartContainer(nameOrId: string, timeout?: number): Promise; /** * Remove a container. */ removeContainer(nameOrId: string, force?: boolean): Promise; /** * List containers. */ listContainers(all?: boolean): Promise; /** * Execute a command in a running container. */ exec(containerName: string, command: string[], options?: { interactive?: boolean; tty?: boolean; }): Promise; /** * Get container logs. */ logs(containerName: string, options?: { follow?: boolean; tail?: number; since?: string; }): Promise; /** * Inspect a container. */ inspectContainer(nameOrId: string): Promise; /** * Get container stats. */ stats(containerNames?: string[]): Promise; /** * Copy files to/from a container. */ cp(containerName: string, src: string, dest: string): Promise; /** * Build an image. */ buildImage(path: string, options?: { tag?: string; file?: string; noCache?: boolean; }): Promise; /** * Pull an image. */ pullImage(name: string): Promise; /** * Push an image. */ pushImage(name: string): Promise; /** * List images. */ listImages(): Promise; /** * Remove an image. */ removeImage(nameOrId: string, force?: boolean): Promise; /** * Run docker compose up. */ composeUp(projectDir: string, options?: { detach?: boolean; build?: boolean; services?: string[]; }): Promise; /** * Run docker compose down. */ composeDown(projectDir: string, options?: { volumes?: boolean; removeOrphans?: boolean; }): Promise; /** * Get docker compose status. */ composePs(projectDir: string): Promise; /** * List volumes. */ listVolumes(): Promise; /** * List networks. */ listNetworks(): Promise; /** * Get Docker disk usage. */ diskUsage(): Promise; /** * Cleanup Docker resources. */ cleanup(options?: { danglingImages?: boolean; stoppedContainers?: boolean; unusedVolumes?: boolean; buildCache?: boolean; all?: boolean; }): Promise; /** * Check container health. */ checkContainerHealth(containerName: string): Promise<{ healthy: boolean; state: string; healthStatus?: string; restartCount: number; } | null>; /** * Monitor a container with periodic health checks. */ monitorContainer(containerName: string, intervalMs: number, callback: (health: { healthy: boolean; state: string; healthStatus?: string; restartCount: number; }) => void): Promise<() => void>; private run; } export declare function getDockerTool(): DockerTool; export declare function resetDockerTool(): void; //# sourceMappingURL=docker-tool.d.ts.map