This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/static/js/services/dockerfile/dockerfile.service.ts

38 lines
1.1 KiB
TypeScript
Raw Normal View History

2017-03-07 19:25:18 +00:00
/**
* Service which provides helper methods for extracting information out from a Dockerfile
* or an archive containing a Dockerfile.
*/
export abstract class DockerfileService {
/**
2017-03-08 19:43:53 +00:00
* Retrieve Dockerfile from given file.
* @param file Dockerfile or archive file containing Dockerfile.
* @return promise Promise which resolves to new DockerfileInfo instance or rejects with error message.
2017-03-07 19:25:18 +00:00
*/
public abstract getDockerfile(file: any): Promise<DockerfileInfo | string>;
2017-03-07 19:25:18 +00:00
}
/**
* Model representing information about a specific Dockerfile.
*/
export abstract class DockerfileInfo {
/**
* Extract the registry base image from the Dockerfile contents.
* @return registryBaseImage The registry base image.
*/
public abstract getRegistryBaseImage(): string | null;
/**
* Extract the base image from the Dockerfile contents.
* @return baseImage The base image.
*/
public abstract getBaseImage(): string | null;
/**
* Extract the base image and tag from the Dockerfile contents.
* @return baseImageAndTag The base image and tag.
*/
public abstract getBaseImageAndTag(): string | null;
}