71 lines
1.4 KiB
TypeScript
71 lines
1.4 KiB
TypeScript
/**
|
|
* Configuration interface for tsdocker
|
|
* Extends legacy config with new Docker build capabilities
|
|
*/
|
|
export interface ITsDockerConfig {
|
|
// Legacy (backward compatible)
|
|
baseImage: string;
|
|
command: string;
|
|
dockerSock: boolean;
|
|
keyValueObject: { [key: string]: any };
|
|
|
|
// New Docker build config
|
|
registries?: string[];
|
|
registryRepoMap?: { [registry: string]: string };
|
|
buildArgEnvMap?: { [dockerArg: string]: string };
|
|
platforms?: string[]; // ['linux/amd64', 'linux/arm64']
|
|
push?: boolean;
|
|
testDir?: string;
|
|
}
|
|
|
|
/**
|
|
* Options for constructing a DockerRegistry
|
|
*/
|
|
export interface IDockerRegistryOptions {
|
|
registryUrl: string;
|
|
username: string;
|
|
password: string;
|
|
}
|
|
|
|
/**
|
|
* Information about a discovered Dockerfile
|
|
*/
|
|
export interface IDockerfileInfo {
|
|
filePath: string;
|
|
fileName: string;
|
|
version: string;
|
|
baseImage: string;
|
|
buildTag: string;
|
|
localBaseImageDependent: boolean;
|
|
}
|
|
|
|
/**
|
|
* Options for creating a Dockerfile instance
|
|
*/
|
|
export interface IDockerfileOptions {
|
|
filePath?: string;
|
|
fileContents?: string;
|
|
read?: boolean;
|
|
}
|
|
|
|
/**
|
|
* Result from a Docker build operation
|
|
*/
|
|
export interface IBuildResult {
|
|
success: boolean;
|
|
tag: string;
|
|
duration?: number;
|
|
error?: string;
|
|
}
|
|
|
|
/**
|
|
* Result from a Docker push operation
|
|
*/
|
|
export interface IPushResult {
|
|
success: boolean;
|
|
registry: string;
|
|
tag: string;
|
|
digest?: string;
|
|
error?: string;
|
|
}
|