Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Pratyay360/podman-ts/llms.txt
Use this file to discover all available pages before exploring further.
NetworksManager is the interface for creating and managing Podman container networks. It is accessible via client.networks on any PodmanClient instance. Networks define how containers communicate with each other and with external systems — you can configure drivers, DNS resolution, IPv6, and custom IP address management.
NetworksManager methods
create
Network instance.
Name of the network to create.
Network driver to use (e.g.
"bridge", "macvlan"). Defaults to "bridge" when omitted.Enable DNS resolution for containers on this network.
Custom DNS server addresses used when
dnsEnabled is true.Enable IPv6 on the network.
Restrict external access — containers can only communicate with each other on this network.
Metadata labels to attach to the network.
Driver-specific options passed through to the network backend.
list
Key/value filters applied server-side (e.g.
{ name: "my-net", label: "env=prod" }).get
Network instance. Throws NotFound if no matching network exists.
exists
true if a network with the given name or ID exists, false otherwise.
remove
Remove the network even if containers are still connected to it.
prune
{ until: "24h" }). Returns a summary of removed networks and reclaimed space.
Network instance methods
ANetwork object is returned by create(), get(), and list(). It exposes the following methods:
| Method | Signature | Description |
|---|---|---|
connect | (containerId: string, options?: { aliases?: string[] }): Promise<void> | Connect a container to the network. Optionally assign DNS aliases. |
disconnect | (containerId: string, options?: { force?: boolean }): Promise<void> | Disconnect a container from the network. |
inspect | (): Promise<Record<string, unknown>> | Return the full JSON inspect object from the Podman API. |
update | (options: { addDNSServers?: string[]; removeDNSServers?: string[] }): Promise<void> | Update DNS servers or other mutable network settings. |
remove | (options?: { force?: boolean }): Promise<void> | Delete this network. |
reload | (): Promise<void> | Refresh network.attrs from the API. |
network.id returns the network’s ID and network.name returns its name, both sourced from the inspect attributes.IPAM configuration
podman-ts exports two classes —IPAMPool and IPAMConfig — for Internet Protocol Address Management. These map directly to Podman’s IPAM configuration structure and are provided for tooling compatibility when you need fine-grained control over IP subnets, ranges, and gateways.
IPAMPool
IPAMPool defines a single IP address pool for a network subnet.
| Option | Type | Description |
|---|---|---|
subnet | string | CIDR subnet (e.g. "192.168.100.0/24"). |
iprange | string | Allocatable range within the subnet. |
gateway | string | Gateway address for the subnet. |
auxAddresses | Record<string, string> | Named auxiliary addresses reserved outside the allocatable range. |
IPAMConfig
IPAMConfig groups one or more IPAMPool instances under a named driver.
| Option | Type | Default | Description |
|---|---|---|---|
driver | string | "host-local" | IPAM driver name. |
poolConfigs | IPAMPool[] | [] | One or more pool configurations. |
options | Record<string, unknown> | {} | Driver-specific options. |