NetworkSettings exposes the network settings in the API NetworkSettings

interface NetworkSettings {
    Bridge?: string;
    EndpointID?: string;
    Gateway?: string;
    GlobalIPv6Address?: string;
    GlobalIPv6PrefixLen?: number;
    HairpinMode?: boolean;
    IPAddress?: string;
    IPPrefixLen?: number;
    IPv6Gateway?: string;
    LinkLocalIPv6Address?: string;
    LinkLocalIPv6PrefixLen?: number;
    MacAddress?: string;
    Networks?: {
        [key: string]: EndpointSettings;
    };
    Ports?: {
        [key: string]: PortBinding[] | null;
    };
    SandboxID?: string;
    SandboxKey?: string;
    SecondaryIPAddresses?: null | Address[];
    SecondaryIPv6Addresses?: null | Address[];
}

Properties

Bridge?: string

Name of the network's bridge (for example, docker0).

EndpointID?: string

EndpointID uniquely represents a service endpoint in a Sandbox.


> Deprecated: This field is only propagated when attached to the > default "bridge" network. Use the information from the "bridge" > network inside the Networks map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0

Gateway?: string

Gateway address for the default "bridge" network.


> Deprecated: This field is only propagated when attached to the > default "bridge" network. Use the information from the "bridge" > network inside the Networks map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0

GlobalIPv6Address?: string

Global IPv6 address for the default "bridge" network.


> Deprecated: This field is only propagated when attached to the > default "bridge" network. Use the information from the "bridge" > network inside the Networks map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0

GlobalIPv6PrefixLen?: number

Mask length of the global IPv6 address.


> Deprecated: This field is only propagated when attached to the > default "bridge" network. Use the information from the "bridge" > network inside the Networks map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0

HairpinMode?: boolean

Indicates if hairpin NAT should be enabled on the virtual interface.

IPAddress?: string

IPv4 address for the default "bridge" network.


> Deprecated: This field is only propagated when attached to the > default "bridge" network. Use the information from the "bridge" > network inside the Networks map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0

IPPrefixLen?: number

Mask length of the IPv4 address.


> Deprecated: This field is only propagated when attached to the > default "bridge" network. Use the information from the "bridge" > network inside the Networks map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0

IPv6Gateway?: string

IPv6 gateway address for this network.


> Deprecated: This field is only propagated when attached to the > default "bridge" network. Use the information from the "bridge" > network inside the Networks map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0

LinkLocalIPv6Address?: string

IPv6 unicast address using the link-local prefix.

LinkLocalIPv6PrefixLen?: number

Prefix length of the IPv6 unicast address.

MacAddress?: string

MAC address for the container on the default "bridge" network.


> Deprecated: This field is only propagated when attached to the > default "bridge" network. Use the information from the "bridge" > network inside the Networks map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0

Networks?: {
    [key: string]: EndpointSettings;
}

Information about all networks that the container is connected to.

Ports?: {
    [key: string]: PortBinding[] | null;
}

PortMap describes the mapping of container ports to host ports, using the container's port-number and protocol as key in the format <port>/<protocol>, for example, 80/udp. If a container's port is mapped for multiple protocols, separate entries are added to the mapping table.

SandboxID?: string

SandboxID uniquely represents a container's network stack.

SandboxKey?: string

SandboxKey identifies the sandbox

SecondaryIPAddresses?: null | Address[]
SecondaryIPv6Addresses?: null | Address[]