docker/ts/docker.classes.container.ts

14 lines
461 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 DockerContainer {
static async getContainers(dockerHostArg: DockerHost): Promise<DockerContainer[]> {
2018-07-17 06:39:37 +00:00
const result: DockerContainer[] = [];
const response = await dockerHostArg.request('GET', '/containers/json');
for(const containerResult in response.body) {
result.push(new DockerContainer());
}
2018-07-16 21:52:50 +00:00
return result;
}
}