docker/ts/docker.classes.image.ts

39 lines
846 B
TypeScript
Raw Normal View History

2018-07-16 21:52:50 +00:00
import * as plugins from './dockersock.plugins';
import { DockerHost } from './docker.classes.host';
export class DockerImage {
2019-08-14 12:19:45 +00:00
// STATIC
2019-08-14 18:56:57 +00:00
public static async createFromRegistry(
dockerHostArg: DockerHost,
dockerImageTag
): Promise<DockerImage> {
2019-08-14 12:19:45 +00:00
const resultingImage = new DockerImage();
return resultingImage;
}
public static async createFromExistingImage(dockerHostArg: DockerHost, dockerImageTag) {}
// INSTANCE
2018-07-16 21:52:50 +00:00
/**
* the tags for an image
*/
2019-08-14 12:19:45 +00:00
public tags: string[] = [];
2018-07-16 21:52:50 +00:00
2019-08-14 12:19:45 +00:00
/**
* returns a boolean wether the image has a upstream image
*/
2019-08-14 18:56:57 +00:00
public isUpstreamImage(): boolean {
2019-08-14 12:19:45 +00:00
// TODO: implement isUpastreamImage
return true;
2019-08-14 18:56:57 +00:00
}
2019-08-14 12:19:45 +00:00
/**
2019-08-14 18:56:57 +00:00
*
2019-08-14 12:19:45 +00:00
*/
2019-08-14 18:56:57 +00:00
public async pullLatestImageFromRegistry(): Promise<boolean> {
2019-08-14 12:19:45 +00:00
// TODO: implement pullLatestImageFromRegistry
return true;
2018-07-16 21:52:50 +00:00
}
2018-07-17 06:39:37 +00:00
}