/** * Docker client for containerization operations * * @see {@link ../../../docs/adr/006-infrastructure-organization.md ADR-006: Infrastructure Layer Organization} */ import type { Logger } from 'pino'; import { type Result } from '../../types'; /** * Docker client configuration options. */ export interface DockerClientConfig { /** Docker socket path (defaults to auto-detection with Colima support) */ socketPath?: string; /** Docker daemon host (for TCP connections) */ host?: string; /** Docker daemon port (for TCP connections) */ port?: number; /** Connection timeout in milliseconds */ timeout?: number; } /** * Result of pushing a Docker image to a registry. */ export interface DockerPushResult { /** Content-addressable digest of the pushed image */ digest: string; /** Size of the pushed image in bytes */ size?: number; } /** * Docker container information. */ export interface DockerContainerInfo { /** Container ID */ Id: string; /** Container names */ Names: string[]; /** Image used for this container */ Image: string; /** Container state */ State: string; /** Container status */ Status: string; } /** * Information about a Docker image. */ export interface DockerImageInfo { /** Unique identifier of the image */ Id: string; /** Repository tags associated with the image */ RepoTags?: string[]; /** Size of the image in bytes */ Size?: number; /** ISO 8601 timestamp when the image was created */ Created?: string; } /** * Docker client interface for container operations. */ export interface DockerClient { /** * Retrieves information about a Docker image. * @param id - Image ID or tag * @returns Result containing image information or error */ getImage: (id: string) => Promise>; /** * Inspects a Docker image and retrieves metadata. * Alias for getImage for consistency with Docker CLI terminology. * @param imageId - Image ID or tag * @returns Result containing image information or error */ inspectImage: (imageId: string) => Promise>; /** * Tags a Docker image with a new repository and tag. * @param imageId - ID of the image to tag * @param repository - Target repository name * @param tag - Target tag name * @returns Result indicating success or error */ tagImage: (imageId: string, repository: string, tag: string) => Promise>; /** * Pushes a Docker image to a registry. * @param repository - Repository name * @param tag - Tag to push * @param authConfig - Optional authentication configuration for registry * @returns Result containing push details or error */ pushImage: (repository: string, tag: string, authConfig?: { username: string; password: string; serveraddress: string; }) => Promise>; /** * Removes a Docker image. * @param imageId - Image ID or tag to remove * @param force - Force removal of the image * @returns Result indicating success or error */ removeImage: (imageId: string, force?: boolean) => Promise>; /** * Removes a Docker container. * @param containerId - Container ID to remove * @param force - Force removal of the container * @returns Result indicating success or error */ removeContainer: (containerId: string, force?: boolean) => Promise>; /** * Lists Docker containers. * @param options - Container list options * @returns Result containing container list or error */ listContainers: (options?: { all?: boolean; filters?: Record; }) => Promise>; /** * Pings the Docker daemon to verify connectivity. * @returns Result indicating whether Docker daemon is available */ ping: () => Promise>; } /** * Create a Docker client with core operations * @param logger - Logger instance for debug output * @param config - Optional Docker client configuration * @returns DockerClient with get, tag, push, and management operations */ export declare const createDockerClient: (logger: Logger, config?: DockerClientConfig) => DockerClient; //# sourceMappingURL=client.d.ts.map