Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
49445d93c6 | |||
4f838837f8 |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@mojoio/docker",
|
||||
"version": "1.0.74",
|
||||
"version": "1.0.75",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@mojoio/docker",
|
||||
"version": "1.0.74",
|
||||
"version": "1.0.75",
|
||||
"description": "easy communication with docker remote api from node, TypeScript ready",
|
||||
"private": false,
|
||||
"main": "dist/index.js",
|
||||
|
@ -90,4 +90,17 @@ export class DockerNetwork {
|
||||
public async remove() {
|
||||
const response = await this.dockerHost.request('DELETE', `/networks/${this.Id}`);
|
||||
}
|
||||
|
||||
public async getContainersOnNetwork(): Promise<{
|
||||
[key: string]: {
|
||||
Name: string;
|
||||
EndpointID: string;
|
||||
MacAddress: string;
|
||||
IPv4Address: string;
|
||||
IPv6Address: string;
|
||||
};
|
||||
}> {
|
||||
const response = await this.dockerHost.request('GET', `/networks/${this.Id}`);
|
||||
return response.body.Containers;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user