feat(host): Add DockerHost version & image-prune APIs, extend network creation options, return exec inspect info, and improve image import/store and streaming
This commit is contained in:
@@ -329,6 +329,7 @@ export class DockerContainer extends DockerResource {
|
||||
): Promise<{
|
||||
stream: plugins.smartstream.stream.Duplex;
|
||||
close: () => Promise<void>;
|
||||
inspect: () => Promise<interfaces.IExecInspectInfo>;
|
||||
}> {
|
||||
// Step 1: Create exec instance
|
||||
const createResponse = await this.dockerHost.request('POST', `/containers/${this.Id}/exec`, {
|
||||
@@ -386,9 +387,15 @@ export class DockerContainer extends DockerResource {
|
||||
}
|
||||
};
|
||||
|
||||
const inspect = async (): Promise<interfaces.IExecInspectInfo> => {
|
||||
const inspectResponse = await this.dockerHost.request('GET', `/exec/${execId}/json`);
|
||||
return inspectResponse.body;
|
||||
};
|
||||
|
||||
return {
|
||||
stream: duplexStream,
|
||||
close,
|
||||
inspect,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user