UNPKG

@apiclient.xyz/docker

Version:

Provides easy communication with Docker remote API from Node.js, with TypeScript support.

64 lines (63 loc) 1.97 kB
import * as interfaces from './interfaces/index.js'; import { DockerHost } from './classes.host.js'; import { DockerResource } from './classes.base.js'; import { DockerService } from './classes.service.js'; export declare class DockerNetwork extends DockerResource { /** * Internal: Get all networks * Public API: Use dockerHost.getNetworks() instead */ static _list(dockerHost: DockerHost): Promise<DockerNetwork[]>; /** * Internal: Get network by name * Public API: Use dockerHost.getNetworkByName(name) instead */ static _fromName(dockerHost: DockerHost, dockerNetworkNameArg: string): Promise<DockerNetwork | undefined>; /** * Internal: Create a network * Public API: Use dockerHost.createNetwork(descriptor) instead */ static _create(dockerHost: DockerHost, networkCreationDescriptor: interfaces.INetworkCreationDescriptor): Promise<DockerNetwork>; Name: string; Id: string; Created: string; Scope: string; Driver: string; EnableIPv6: boolean; Internal: boolean; Attachable: boolean; Ingress: false; IPAM: { Driver: 'default' | 'bridge' | 'overlay'; Config: [ { Subnet: string; IPRange: string; Gateway: string; } ]; }; constructor(dockerHostArg: DockerHost); /** * Refreshes this network's state from the Docker daemon */ refresh(): Promise<void>; /** * Removes the network */ remove(): Promise<void>; listContainersOnNetwork(): Promise<Array<{ Name: string; EndpointID: string; MacAddress: string; IPv4Address: string; IPv6Address: string; }>>; getContainersOnNetworkForService(serviceArg: DockerService): Promise<{ Name: string; EndpointID: string; MacAddress: string; IPv4Address: string; IPv6Address: string; }[]>; }