UNPKG

1.27 kBPlain TextView Raw
1export interface DockerFileAnalysis {
2 baseImage?: string;
3 dockerfilePackages: DockerFilePackages;
4 dockerfileLayers: DockerFileLayers;
5 error?: {
6 code: DockerFileAnalysisErrorCode;
7 };
8}
9
10export enum DockerFileAnalysisErrorCode {
11 BASE_IMAGE_NAME_NOT_FOUND = "BASE_IMAGE_NAME_NOT_FOUND",
12 BASE_IMAGE_NON_RESOLVABLE = "BASE_IMAGE_NON_RESOLVABLE",
13}
14
15export interface DockerFilePackages {
16 [packageName: string]: {
17 instruction: string;
18 installCommand: string;
19 };
20}
21
22export interface DockerFileLayers {
23 [id: string]: {
24 instruction: string;
25 };
26}
27
28export interface GetDockerfileBaseImageNameResult {
29 baseImage?: string;
30 error?: GetDockerfileBaseImageNameResultError;
31}
32
33export interface GetDockerfileBaseImageNameResultError {
34 code: DockerFileAnalysisErrorCode;
35}
36
37export interface UpdateDockerfileBaseImageNameResult {
38 contents: string;
39 error?: UpdateDockerfileBaseImageNameError;
40}
41
42export interface UpdateDockerfileBaseImageNameError {
43 code: UpdateDockerfileBaseImageNameErrorCode;
44}
45
46export enum UpdateDockerfileBaseImageNameErrorCode {
47 BASE_IMAGE_NAME_FRAGMENTED = "BASE_IMAGE_NAME_FRAGMENTED",
48 BASE_IMAGE_NAME_NOT_FOUND = "BASE_IMAGE_NAME_NOT_FOUND",
49 DOCKERFILE_GENERATION_FAILED = "DOCKERFILE_GENERATION_FAILED",
50}