feat(tsdocker): add multi-registry and multi-arch Docker build/push/pull manager, registry storage, Dockerfile handling, and new CLI commands
This commit is contained in:
70
ts/interfaces/index.ts
Normal file
70
ts/interfaces/index.ts
Normal file
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
Reference in New Issue
Block a user