token-injectable-docker-builder
Version:
The TokenInjectableDockerBuilder is a flexible AWS CDK construct that enables the usage of AWS CDK tokens in the building, pushing, and deployment of Docker images to Amazon Elastic Container Registry (ECR). It leverages AWS CodeBuild and Lambda custom re
25 lines (24 loc) • 1.03 kB
TypeScript
/**
* Parse a .dockerignore file at `sourcePath` (if present) and combine it with
* a user-supplied exclude list. The Dockerfile itself is never excluded —
* `.dockerignore` patterns matching `dockerFile` are filtered out so the
* S3 asset always contains the Dockerfile.
*/
export declare function resolveExcludes(sourcePath: string, dockerFile: string, exclude: string[] | undefined): string[] | undefined;
export interface BuildSpecOptions {
readonly imageTag: string;
readonly dockerFile?: string;
readonly buildArgs?: {
[key: string]: string;
};
readonly dockerLoginSecretArn?: string;
readonly installCommands?: string[];
readonly preBuildCommands?: string[];
readonly cacheDisabled: boolean;
readonly platform: 'linux/amd64' | 'linux/arm64';
}
/**
* Assemble the plain buildspec object that the construct passes to
* `BuildSpec.fromObject`. Pure function — easy to unit test.
*/
export declare function buildBuildSpec(opts: BuildSpecOptions): Record<string, unknown>;