Viewing docs for Docker v5.0.0
published on Tuesday, Apr 21, 2026 by Pulumi
published on Tuesday, Apr 21, 2026 by Pulumi
Viewing docs for Docker v5.0.0
published on Tuesday, Apr 21, 2026 by Pulumi
published on Tuesday, Apr 21, 2026 by Pulumi
docker.Network provides details about a specific Docker Network.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as docker from "@pulumi/docker";
const main = docker.getNetwork({
name: "main",
});
import pulumi
import pulumi_docker as docker
main = docker.get_network(name="main")
package main
import (
"github.com/pulumi/pulumi-docker/sdk/v5/go/docker"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := docker.GetNetwork(ctx, &docker.LookupNetworkArgs{
Name: "main",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Docker = Pulumi.Docker;
return await Deployment.RunAsync(() =>
{
var main = Docker.Index.GetNetwork.Invoke(new()
{
Name = "main",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.docker.DockerFunctions;
import com.pulumi.docker.inputs.GetNetworkArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var main = DockerFunctions.getNetwork(GetNetworkArgs.builder()
.name("main")
.build());
}
}
variables:
main:
fn::invoke:
function: docker:getNetwork
arguments:
name: main
Using getNetwork
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getNetwork(args: GetNetworkArgs, opts?: InvokeOptions): Promise<GetNetworkResult>
function getNetworkOutput(args: GetNetworkOutputArgs, opts?: InvokeOptions): Output<GetNetworkResult>def get_network(name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetNetworkResult
def get_network_output(name: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNetworkResult]func LookupNetwork(ctx *Context, args *LookupNetworkArgs, opts ...InvokeOption) (*LookupNetworkResult, error)
func LookupNetworkOutput(ctx *Context, args *LookupNetworkOutputArgs, opts ...InvokeOption) LookupNetworkResultOutput> Note: This function is named LookupNetwork in the Go SDK.
public static class GetNetwork
{
public static Task<GetNetworkResult> InvokeAsync(GetNetworkArgs args, InvokeOptions? opts = null)
public static Output<GetNetworkResult> Invoke(GetNetworkInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetNetworkResult> getNetwork(GetNetworkArgs args, InvokeOptions options)
public static Output<GetNetworkResult> getNetwork(GetNetworkArgs args, InvokeOptions options)
fn::invoke:
function: docker:index/getNetwork:getNetwork
arguments:
# arguments dictionaryThe following arguments are supported:
- Name string
- The name of the Docker network.
- Name string
- The name of the Docker network.
- name String
- The name of the Docker network.
- name string
- The name of the Docker network.
- name str
- The name of the Docker network.
- name String
- The name of the Docker network.
getNetwork Result
The following output properties are available:
- Containers
List<Get
Network Container> - Containers attached to the network.
- Driver string
- The driver of the Docker network. Possible values are
bridge,host,overlay,macvlan. See network docs for more details. - Id string
- The ID of this resource.
- Internal bool
- If
true, the network is internal. - Ipam
Configs List<GetNetwork Ipam Config> - The IPAM configuration options
- Name string
- The name of the Docker network.
- Options Dictionary<string, string>
- Only available with bridge networks. See bridge options docs for more details.
- Scope string
- Scope of the network. One of
swarm,global, orlocal.
- Containers
[]Get
Network Container - Containers attached to the network.
- Driver string
- The driver of the Docker network. Possible values are
bridge,host,overlay,macvlan. See network docs for more details. - Id string
- The ID of this resource.
- Internal bool
- If
true, the network is internal. - Ipam
Configs []GetNetwork Ipam Config - The IPAM configuration options
- Name string
- The name of the Docker network.
- Options map[string]string
- Only available with bridge networks. See bridge options docs for more details.
- Scope string
- Scope of the network. One of
swarm,global, orlocal.
- containers
List<Get
Network Container> - Containers attached to the network.
- driver String
- The driver of the Docker network. Possible values are
bridge,host,overlay,macvlan. See network docs for more details. - id String
- The ID of this resource.
- internal Boolean
- If
true, the network is internal. - ipam
Configs List<GetNetwork Ipam Config> - The IPAM configuration options
- name String
- The name of the Docker network.
- options Map<String,String>
- Only available with bridge networks. See bridge options docs for more details.
- scope String
- Scope of the network. One of
swarm,global, orlocal.
- containers
Get
Network Container[] - Containers attached to the network.
- driver string
- The driver of the Docker network. Possible values are
bridge,host,overlay,macvlan. See network docs for more details. - id string
- The ID of this resource.
- internal boolean
- If
true, the network is internal. - ipam
Configs GetNetwork Ipam Config[] - The IPAM configuration options
- name string
- The name of the Docker network.
- options {[key: string]: string}
- Only available with bridge networks. See bridge options docs for more details.
- scope string
- Scope of the network. One of
swarm,global, orlocal.
- containers
Sequence[Get
Network Container] - Containers attached to the network.
- driver str
- The driver of the Docker network. Possible values are
bridge,host,overlay,macvlan. See network docs for more details. - id str
- The ID of this resource.
- internal bool
- If
true, the network is internal. - ipam_
configs Sequence[GetNetwork Ipam Config] - The IPAM configuration options
- name str
- The name of the Docker network.
- options Mapping[str, str]
- Only available with bridge networks. See bridge options docs for more details.
- scope str
- Scope of the network. One of
swarm,global, orlocal.
- containers List<Property Map>
- Containers attached to the network.
- driver String
- The driver of the Docker network. Possible values are
bridge,host,overlay,macvlan. See network docs for more details. - id String
- The ID of this resource.
- internal Boolean
- If
true, the network is internal. - ipam
Configs List<Property Map> - The IPAM configuration options
- name String
- The name of the Docker network.
- options Map<String>
- Only available with bridge networks. See bridge options docs for more details.
- scope String
- Scope of the network. One of
swarm,global, orlocal.
Supporting Types
GetNetworkContainer
- Container
Id string - The container id.
- Endpoint
Id string - The endpoint id.
- Ipv4Address string
- The IPv4 address.
- Ipv6Address string
- The IPv6 address.
- Mac
Address string - The MAC address.
- Name string
- The container name.
- Container
Id string - The container id.
- Endpoint
Id string - The endpoint id.
- Ipv4Address string
- The IPv4 address.
- Ipv6Address string
- The IPv6 address.
- Mac
Address string - The MAC address.
- Name string
- The container name.
- container
Id String - The container id.
- endpoint
Id String - The endpoint id.
- ipv4Address String
- The IPv4 address.
- ipv6Address String
- The IPv6 address.
- mac
Address String - The MAC address.
- name String
- The container name.
- container
Id string - The container id.
- endpoint
Id string - The endpoint id.
- ipv4Address string
- The IPv4 address.
- ipv6Address string
- The IPv6 address.
- mac
Address string - The MAC address.
- name string
- The container name.
- container_
id str - The container id.
- endpoint_
id str - The endpoint id.
- ipv4_
address str - The IPv4 address.
- ipv6_
address str - The IPv6 address.
- mac_
address str - The MAC address.
- name str
- The container name.
- container
Id String - The container id.
- endpoint
Id String - The endpoint id.
- ipv4Address String
- The IPv4 address.
- ipv6Address String
- The IPv6 address.
- mac
Address String - The MAC address.
- name String
- The container name.
GetNetworkIpamConfig
- Aux
Address Dictionary<string, string> - Auxiliary IPv4 or IPv6 addresses used by Network driver
- Gateway string
- The IP address of the gateway
- Ip
Range string - The ip range in CIDR form
- Subnet string
- The subnet in CIDR form
- Aux
Address map[string]string - Auxiliary IPv4 or IPv6 addresses used by Network driver
- Gateway string
- The IP address of the gateway
- Ip
Range string - The ip range in CIDR form
- Subnet string
- The subnet in CIDR form
- aux
Address Map<String,String> - Auxiliary IPv4 or IPv6 addresses used by Network driver
- gateway String
- The IP address of the gateway
- ip
Range String - The ip range in CIDR form
- subnet String
- The subnet in CIDR form
- aux
Address {[key: string]: string} - Auxiliary IPv4 or IPv6 addresses used by Network driver
- gateway string
- The IP address of the gateway
- ip
Range string - The ip range in CIDR form
- subnet string
- The subnet in CIDR form
- aux_
address Mapping[str, str] - Auxiliary IPv4 or IPv6 addresses used by Network driver
- gateway str
- The IP address of the gateway
- ip_
range str - The ip range in CIDR form
- subnet str
- The subnet in CIDR form
- aux
Address Map<String> - Auxiliary IPv4 or IPv6 addresses used by Network driver
- gateway String
- The IP address of the gateway
- ip
Range String - The ip range in CIDR form
- subnet String
- The subnet in CIDR form
Package Details
- Repository
- Docker pulumi/pulumi-docker
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
dockerTerraform Provider.
Viewing docs for Docker v5.0.0
published on Tuesday, Apr 21, 2026 by Pulumi
published on Tuesday, Apr 21, 2026 by Pulumi
