import type { DockerImageType } from "../../interfaces/DockerResourceTypes";
import type { BuildPlatform } from "../../interfaces/SystemTypes";
interface DockerBuildOptions {
    dockerFile?: string;
    buildDirectory?: string;
    /**
     * Set the target platform for the build.
     */
    platforms?: BuildPlatform[];
    /**
     * Will automatically push the build result to registry after build success.
     */
    shouldPush?: boolean;
    /**
     * Driver to use (available: `docker-container`, `remote`)
     * - [DEFAULT] `docker-container`: Uses a BuildKit container that will be spawned via docker. With this driver, both building multi-platform images and exporting cache are supported.
     * - `remote`: Uses a remote instance of buildkitd over an arbitrary connection. With this driver, you manually create and manage instances of buildkit yourself, and configure buildx to point at it.
     *
     * 	*Unlike docker driver, built images will not automatically appear in docker images and build --load needs to be used to achieve that.*
     */
    driver?: "docker-container" | "remote";
    /**
     * Builder container name
     */
    builder?: string;
    /**
     * Use an external cache source for a build.
     * - [TYPE/DEFAULT] `registry`: can import cache from a cache manifest or (special) image configuration on the registry.
     * - [TYPE] `local`: can import cache from local files previously exported with `--cache-to`.
     * - [TYPE] `s3`: can import cache from a previously exported cache with `--cache-to` in your S3 bucket
     * @example
     * docker buildx build --cache-from=user/app:cache .
     * docker buildx build --cache-from=user/app .
     * docker buildx build --cache-from=type=registry,ref=user/app .
     * docker buildx build --cache-from=type=local,src=path/to/cache .
     * docker buildx build --cache-from=type=gha .
     * docker buildx build --cache-from=type=s3,region=eu-west-1,bucket=mybucket .
     */
    cacheFroms?: {
        type: "local" | "registry" | "s3";
        value: string;
    }[];
    /**
     * Specify build arguments
     * @example
     * docker build --build-arg ARG_NAME_1=ARG_VALUE_1 --build-arg ARG_NAME_2=ARG_VALUE_2 -t IMAGE_NAME:TAG .
     */
    args?: {
        name: string;
        value: string;
    }[];
    /**
     * Build logs listener
     */
    onBuilding?: (message: string) => void;
    onError?: (message: string) => void;
}
export declare class BuildContainerError extends Error {
    data: {
        imageName: string;
    };
    constructor(data: {
        imageName: string;
    }, message?: string);
}
/**
 * Build & push image using Docker
 * @param imageName Image name = "image_url:tag"
 * @returns Image URL of the build
 */
export declare const build: (imageName: string, options?: DockerBuildOptions) => Promise<string>;
/**
 * Stop the build
 * @returns Image URL of the build
 */
export declare const stopBuild: (builder: string) => Promise<boolean>;
export declare const getAllImages: () => Promise<DockerImageType[]>;
export {};
//# sourceMappingURL=docker.d.ts.map